Advertisement
Tariqul_Islam

digit reverse

Jul 30th, 2019
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.20 KB | None | 0 0
  1. #include<stdio.h>
  2. void revdigit(int n)
  3. {
  4.  
  5. int x;
  6. if(n==0)return ;
  7. else
  8. {
  9. x=n%10;
  10. printf("%d",x);
  11. revdigit(n/10);
  12. }
  13.  
  14. }
  15. int main()
  16. {
  17. int n;
  18. scanf("%d",&n);
  19. revdigit(n);
  20. return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement