?? 1.c
字號:
#include<stdio.h>
#define L 10
void conversion(int N,int r)
{
int s[L],top;
int x;
top=-1;
while(N)
{
s[++top]=N%r;
N/=r;
}
while(top!=-1)
{
x=s[top--];
printf("%d",x);
}
}
main()
{
int N,r;
printf("請輸入你想轉換的數");
scanf("%d",&N);
printf("請輸入你想轉換的進制");
scanf("%d",&r);
conversion(N,r);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -