#include<stdio.h> int main(){ int n; scanf("%d",&n); int i=0; int b[100000]; while(n>0){ b[i]=n%10; n=n/10; i++; } for(int j=i-1;j>=0;j--){ if(j!=0) printf("%d ",b[j]); else printf("%d",b[j]); } }
Double click to view unformatted code.