#include <stdio.h>
#include<math.h>
void main(){
    
     int x=12345;
     int b=10000;
     int arr[5];
     int c;
   //  printf("%d",c);
     for(int i=0;i<5;i++){
         c=x/b;
         x=x%b;
         arr[i]=c;
         b=b/10;
 //    
 }
 
  //   printf("the array =\n");
    for(int i=0;i<5;i++){
     printf(" %d %d\n",i,arr[i]);
}
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: