?? 數制的轉換.cpp
字號:
#include"SqStack.h"
int conversion(){
SqStack S;int N,i;
InitStack(S);
cout<<"請輸入需要轉制的非負十制數: ";
cin>>N;cout<<endl;
cout<<"請輸入要轉換成的比十小的數制:";
cin>>i;
if(i<=1||N<=0) {cout<<"請輸入正數"<<endl;return ERROR;}
while(N){
Push(S,N%i);
N=N/i;
}
while(!StackEmpty(S)){
Pop(S,i);
cout<<i;
}
cout<<endl;
return OK;
}
//
void main()
{
conversion();
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -