Anik_Akash

Revers Number in C

Nov 30th, 2020
533
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2.  
  3. int main() {
  4.     int n, reminder=0;
  5.     scanf("%d",&n);
  6.     while(n!=0){
  7.         reminder = (reminder*10)+(n%10);
  8.         n/=10;
  9.     }
  10.     printf("%d\n",reminder);
  11.  
  12.     return 0;
  13. }
  14.  
RAW Paste Data