20201321周慧琳

2021年4月25日

递归实现

摘要: 递归实现任意整数转换为字符串 #include <stdio.h> void convert(int n) { int i; if ((i = n / 10) != 0) { convert(i); //i是余数 } putchar(n % 10 + '0');//+‘0’操作就是把整数转换为字符串 阅读全文

posted @ 2021-04-25 15:46 20201321周慧琳 阅读(79) 评论(0) 推荐(0) 编辑