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