随笔分类 - PAT乙级练习题(C++)
摘要://读入 n(>0)名学生的姓名、学号、成绩,分别输出成绩最高和成绩最低学生的姓名和学号。 #include <iostream>#include <stdio.h>#include <string.h>typedef struct Student { char name[11]; char num
阅读全文
摘要://读入一个正整数 n,计算其各位数字之和,用汉语拼音写出和的每一位数字。 #include <iostream>#include <stdio.h>#include <string.h> int main(void){ char num[102] = { 0 }; char pinyin[3] =
阅读全文
摘要://对于一个任意的不超过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
阅读全文

浙公网安备 33010602011771号