Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int n;
- scanf("%d", &n);
- int prevrten_broj = 0;
- int tmp = n;
- while(tmp > 0) {
- int cifra = tmp % 10;
- tmp /= 10;
- prevrten_broj = (prevrten_broj * 10) + cifra;
- }
- printf("%d\n", prevrten_broj);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement