main()
{ /*进制转换*/
int m,n,i=0,j,a[20];
printf("enter the number you want to convert:\n");
scanf("%d",&n);
printf("enter the number you want to be converted to be:\n");
scanf("%d",&m);
do
{
i++;
a[i]=n%m;
n=n/m;
}while(n!=0);
for(j=i;j>=1;j--)
printf(" %d",a[j]);
getch();
}