摘要: //读入一个正整数 n,计算其各位数字之和,用汉语拼音写出和的每一位数字。 #include <iostream>#include <stdio.h>#include <string.h> int main(void){ char num[102] = { 0 }; char pinyin[3] = 阅读全文
posted @ 2022-07-15 15:26 九饼多一点 阅读(25) 评论(0) 推荐(0)
摘要: //对于一个任意的不超过1000的正整数,偶数除以二,奇数(3*n+1)除以2,到多少步才可以使得n=1#include <iostream> int main(int argc,const char* argv[]){ int n,cnt; cnt = 0; std::cin >> n; whil 阅读全文
posted @ 2022-07-15 14:16 九饼多一点 阅读(25) 评论(0) 推荐(0)