description輸入乙個十進位製非負整數,將其轉換成對應的 r (2 <= r <= 9) 進製數,並輸出。
input第一行輸入需要轉換的十進位製非負整數; 第二行輸入 r。
output 輸出轉換所得的 r 進製數。
sample input
1279
8output
2377
#include
using
namespace std;
const
int maxsize=
100;
typedef
struct node
stack;
void
push
(stack &sta,
int x)
//入棧
else
}void
pop(stack &sta)
//出棧
}bool
isempty
(stack&sta)
intmain()
while
(isempty
(sta))}
return0;
}
資料結構實驗之棧與佇列一 進製轉換
problem description 輸入乙個十進位製非負整數,將其轉換成對應的 r 2 r 9 進製數,並輸出。input 第一行輸入需要轉換的十進位製非負整數 第二行輸入 r。output 輸出轉換所得的 r 進製數。example input 1279 8 example output 23...
資料結構實驗之棧與佇列一 進製轉換
time limit 1000ms memory limit 65536kb submit statistic problem description 輸入乙個十進位製非負整數,將其轉換成對應的 r 2 r 9 進製數,並輸出。input 第一行輸入需要轉換的十進位製非負整數 第二行輸入 r。out...
資料結構實驗之棧與佇列一 進製轉換
problem description 輸入乙個十進位製非負整數,將其轉換成對應的 r 2 r 9 進製數,並輸出。input 第一行輸入需要轉換的十進位製非負整數 第二行輸入 r。output 輸出轉換所得的 r 進製數。example input 1279 8 example output 23...