算法思路:
(1) 读入N进制的数,先将其转换为10进制
(2)然后再把十进制转换为M进制.
(3)要用到的数据结构,栈,队列
代码如下(N,M必须小于10.)
queue.h
将N进制转换为M进制#ifndef __queue__h
将N进制转换为M进制
#define __queue__h
将N进制转换为M进制
#define MAX 100
将N进制转换为M进制
class queue
#endif

stack.h
将N进制转换为M进制#ifndef __stack__h
将N进制转换为M进制
#define    __stack__h
将N进制转换为M进制
#define MAX 100
将N进制转换为M进制
class stack
#endif


主程序:
将N进制转换为M进制#include "queue.h"
将N进制转换为M进制#include 
"stack.h"
将N进制转换为M进制#include
<stdio.h>
将N进制转换为M进制
int main()
}

相关文章:

  • 2021-05-26
  • 2022-12-23
  • 2021-11-20
  • 2021-10-01
  • 2022-02-04
  • 2022-12-23
  • 2021-12-01
  • 2021-12-14
猜你喜欢
  • 2022-12-23
  • 2022-01-14
  • 2022-12-23
  • 2021-06-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案