# include<stdio.h> # include<math.h> main() { int x=12345,y; int i,a[5]; for(i=0;i<=4;i++) { y=x%(int)pow(10,i+1); a[i]=y/(pow(10,i)); printf("%d",a[i]); } }