Computer Science, asked by Shahrobiurrahman, 8 months ago

Write a program take a number as input and show reverses order

Answers

Answered by joshuabinu25
0

Answer:

Pictorial Presentation:

Sample Solution:

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); }

hope it is helpful...

plz mark as brainliest.

Answered by Anonymous
4

Answer:

Explanation:

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