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