#include<stdio.h>
#include<malloc.h>
int main( )
{
int input = 0,choice = 0,i = 0, * array = (int *)malloc(sizeof(int));
printf("please enter data as ten system\n");
scanf("%d",&input);
printf("please enter what system you want\n");
scanf("%d",&choice);
do{
array[i++] = input%choice;
input /= choice;
}while(input != 0);
for(i = i-1;i >= 0;i--)
{
printf("%d",array[i]);
}
printf("\n");
return 0;
}