sandra0309

audi4.vezba5

Jan 17th, 2015
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.18 KB | None | 0 0
  1. #include<stdio.h>
  2. int main ()
  3. { int n,i,suma=0,cifra=0;
  4.  scanf("%d",&n);
  5.  while(n)
  6.  {
  7.   cifra=n%10;
  8.   suma=suma*10+cifra;
  9.   n/=10;
  10.  
  11.  
  12.  }
  13.  printf("%d",suma);
  14.  
  15.  
  16. return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment