<span style="font-size:24px;">#include <stdio.h>
int fetc(int val,int val2){
if(val<val2){
return val;
}else{
return fetc(val/val2,val2)*10+val%val2;
}
}
int main(void){
int val,val2;
printf("输入进制\n");
scanf("%d",&val2);
printf("输入值\n");
scanf("%d",&val);
printf("%d\n",fetc(val,val2));
return 0;
}</span>
进制转换
最新推荐文章于 2023-07-11 16:35:29 发布