Toggle navigation
HUSTOJ
F.A.Qs
Web Board
ProblemSet
Source/Category
Status
Ranklist
Contest
Recent
Login
Problem1852--十进制转换二进制
1852: 十进制转换二进制
Time Limit:
1 Sec
Memory Limit:
128 MB
Submit:
0
Solved:
0
[
Submit
] [
Status
] [
Web Board
] [Creator:
]
Description
本题要求实现一个函数,将正整数n转换为二进制后输出。 函数接口定义: void dectobin( int n ); 函数dectobin应在一行中打印出二进制的n。建议用递归实现。 裁判测试程序样例: #include
void dectobin( int n ); int main() { int n; scanf(
Input
十进制正整数n
Output
函数dectobin应在一行中打印出二进制的n。建议用递归实现。
Sample Input
Copy
10
Sample Output
Copy
1010
Source/Category
230