#include<stdio.h> #include<math.h> int main(){ int a,i=4,temp; scanf("%d",&a); while(i){ temp = a/pow(10,i-1); printf("%d",temp%10); if(i!=1) printf(" "); i--; } return 0; }
Double click to view unformatted code.