//群:970353786
#include "stdio.h"
#include
using namespace std;
#define StackSize 100
typedef char ElemType;
typedef struct
{
ElemType data[StackSize];
int top;
}SqStack;
int trans(int d, int b, char string[]) //string用于存放转换后的字符串
{
SqStack st;
char ch;
int r, i = 0;
st.top = -1; // 栈初始化
if (b 36 || b == 10) // 2≤b≤36且不为10
{
printf_s(" b is Error\n"); return 0;
}
while (d != 0)//辗转相除法
{
r = d % b; //求余数
ch = r + (r
关注
打赏
任意进制转换
立即登录/注册


微信扫码登录