Advertisement
skashminzim

reverse

May 1st, 2018
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.14 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {int x,rem,rev=0;
  4. scanf("%d",&x);
  5. while(x!=0)
  6. {
  7. rem=x%10;
  8. rev=rev*10+rem;
  9. x=x/10;
  10. }
  11. printf("%d",rev);
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement