Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int num,x,r_num=0;
- printf("Input a number: ");
- scanf("%d",&num);
- printf("\nThe original number = %d",num);
- while(num>=1)
- {
- x=num%10;
- r_num=r_num*10+x;
- num=num/10;
- }
- printf("\nThe reverse of the said number = %d",r_num);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement