Computer Science, asked by yadav1973sky, 6 months ago

write a program to print first five numbers in reverse order​

Answers

Answered by CarlosTheGreat
1

Write a program in C to display the number in reverse order.

1)  Pictorial Presentation:

2) Sample Solution:

3)C Code: #include <stdio.h> void main(){ int num,r,sum=0,t; printf("Input a number: "); scanf("%d",&num); for(t=num;num!=0;num=num/10){ r=num % 10; sum=sum*10+r; } printf("The number in reverse order is : %d \n",sum); }

Similar questions