Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main(){
- int n;
- while(scanf("%d", &n) != 0) {
- int broj = n; // zacuvaj ja vrednosta na n
- while(broj > 0) { // dodeka brojot e pogolem od 0
- int posledna_cifra = broj % 10; // zemi ja poslednata cifra na brojot
- printf("%d ", posledna_cifra);
- broj /= 10; // trgni ja poslednata cifra od samiot broj
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment