hi i dont know why but i get RTE on my program. Here my code
#include<stdio.h>
int a[101];
int main()
{
int dig,bas,len;
scanf("%d%d%d",&dig,&bas,&len);
bas++;
int tem(0);
while(dig)
{
a[tem]=dig%bas;
dig/=bas;
tem++;
// printf("%d",dig);
}
for(int x=0;x<len;x++)printf("%d ",a[x]);
printf("\n");
}
here my link for solution