⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄

📁 out< "please input the number of the nodes"<<endl cin>>nodesNum cout<<"pl
💻
字号:
#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 + -