Advertisement
Guest User

Untitled

a guest
Oct 20th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main()
  5. {
  6. int a;
  7. int b;
  8. int c;
  9. int d;
  10. int e;
  11. int f;
  12.  
  13. printf("Unesite cetvorocifreni broj: ");
  14. scanf(" %d", &a);
  15.  
  16. b = a % 10;
  17. c = a / 10 % 10;
  18. d = a / 100 % 10;
  19. e = a / 1000;
  20.  
  21. f = b * 1000 + c * 100 + d * 10 + e;
  22.  
  23. printf("Uneseni broj obrnutih cifara je: %d ", f);
  24.  
  25.  
  26. return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement