Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main() {
- int N;
- scanf("%d", &N);
- while(N > 0) {
- int posledna_cifra = N % 10;
- printf("%d ", posledna_cifra);
- N /= 10;
- }
- return 0;
- }
- // 134 % 10 = 4
- // 134 /= 10 --> 13
- // 13 % 10 = 3
- // 13 / 10 = 1
- // 1 % 10 = 1
- // 1 / 10 = 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement