摘要: 本题扩展为不固定高度不固定次数(系统输入) 阅读全文
posted @ 2019-08-23 20:46 狗狗王 阅读(929) 评论(0) 推荐(0)
摘要: #include #include #include /*题目:一个数如果恰好等于除开它本身外的因子之和,这个数就称为“完数”。例如6=1+2+3.编程找出1000以内的所有完数*/ int main() { system("color 1F"); // 设定显示框为蓝底白字 system("mode con cols=80 lines=30"); //固定显示框尺寸 /... 阅读全文
posted @ 2019-08-23 17:55 狗狗王 阅读(834) 评论(0) 推荐(0)
摘要: #include #include #include /*题目:求s=a+aa+aaa+aaaa+aa...a的值,其中a是一个数字。例如2+22+222+2222+22222(此时共有5个数相加) ,几个数相加有键盘控制。*/ int main() { system("color 1F"); // 设定显示框为蓝底白字 system("mode con cols=80 l... 阅读全文
posted @ 2019-08-23 17:54 狗狗王 阅读(3604) 评论(0) 推荐(0)
摘要: #include #include /*题目:输入一行字符,分别统计出其中英文字母、空格、数字和其它字符的个数*/ int main() { system("color 1F"); // 设定显示框为蓝底白字 system("mode con cols=80 lines=30"); //固定显示框尺寸 /*******************************... 阅读全文
posted @ 2019-08-23 17:53 狗狗王 阅读(3866) 评论(0) 推荐(0)
摘要: #include<stdio.h> #include<stdlib.h> /*题目:输入两个正整数m和n,求其最大公约数和最小公倍数*/ int main() { system("color 1F"); // 设定显示框为蓝底白字 system("mode con cols=80 lines=30"); //固定显示框尺寸 /************************************ 阅读全文
posted @ 2019-08-23 17:52 狗狗王 阅读(4952) 评论(0) 推荐(0)
摘要: #include #include /*题目:利用条件运算符的嵌套来完成此题:学习成绩>=90分的同学用A 表示,60-89 分之间的用B 表示,60分以下的用C表示*/ int main() { system("color 1F"); // 设定显示框为蓝底白字 system("mode con cols=80 lines=30"); //固定显示框尺寸 /***************... 阅读全文
posted @ 2019-08-23 17:51 狗狗王 阅读(1214) 评论(0) 推荐(0)
摘要: #include<stdio.h> #include<stdlib.h> /*题目:将一个正整数分解质因数*/ int main() { system("color 1F"); // 设定显示框为蓝底白字 system("mode con cols=80 lines=30"); //固定显示框尺寸 /******************************************程序主体分割线 阅读全文
posted @ 2019-08-23 17:50 狗狗王 阅读(1042) 评论(0) 推荐(0)
摘要: #include<stdio.h> #include<stdlib.h> /*题目:打印出所有的“水仙花数”,所谓“水仙花数”是指一个三位数,其各位数字立方和等于该数本身*/ int main() { system("color 1F"); // 设定显示框为蓝底白字 system("mode con cols=80 lines=50"); //固定显示框尺寸 /***************** 阅读全文
posted @ 2019-08-23 17:48 狗狗王 阅读(2782) 评论(0) 推荐(0)
摘要: 【此处扩展为求任意两个数m,n之间的素数及个数】 阅读全文
posted @ 2019-08-23 17:47 狗狗王 阅读(2879) 评论(0) 推荐(0)
摘要: #include<stdio.h> #include<stdlib.h> /*题目:有一对兔子,从出生后第3个月起每个月都生一对兔子,小兔子长到第三个月后每个月又生一对兔子,假如兔子都不死,问每个月的兔子总数为多少?*/ int main() { system("color 1F"); // 设定显示框为蓝底白字 system("mode con cols=80 lines=30"); //固定显 阅读全文
posted @ 2019-08-23 17:46 狗狗王 阅读(672) 评论(0) 推荐(0)
摘要: #include #include /*题目:打印楼梯和笑脸*/ int main() { //system("color 1F"); // 设定显示框为蓝底白字 system("mode con cols=80 lines=30"); //固定显示框尺寸 /******************************************程序主体分割线(顶部)*************... 阅读全文
posted @ 2019-08-23 17:44 狗狗王 阅读(808) 评论(0) 推荐(0)
摘要: #include #include /*题目:输出国际象棋棋盘*/ int main() { //system("color 1F"); // 设定显示框为蓝底白字 system("mode con cols=80 lines=30"); //固定显示框尺寸 /******************************************程序主体分割线(顶部)************... 阅读全文
posted @ 2019-08-23 17:44 狗狗王 阅读(1459) 评论(0) 推荐(0)
摘要: #include<stdio.h> #include<stdlib.h> /*题目:输出9*9 口诀。*/ int main() { system("color 1F"); // 设定显示框为蓝底白字 system("mode con cols=80 lines=30"); //固定显示框尺寸 /******************************************程序主体分割线(顶 阅读全文
posted @ 2019-08-23 17:42 狗狗王 阅读(807) 评论(1) 推荐(0)
摘要: #include<stdio.h> #include<stdlib.h> /*题目:输出特殊图案,请在c 环境中运行,看一看, VeryBeautiful!*/ int main() { system("color 1F"); // 设定显示框为蓝底白字 system("mode con cols=80 lines=30"); //固定显示框尺寸 /************************ 阅读全文
posted @ 2019-08-23 17:41 狗狗王 阅读(1968) 评论(0) 推荐(0)
摘要: #include<stdio.h> #include<stdlib.h> /*题目:用*号输出字母C的图案*/ int main() { system("color 1F"); // 设定显示框为蓝底白字 system("mode con cols=80 lines=30"); //固定显示框尺寸 /******************************************程序主体分割线 阅读全文
posted @ 2019-08-23 17:38 狗狗王 阅读(2938) 评论(0) 推荐(1)
摘要: #include<stdio.h> #include<stdlib.h> /*题目:输入三个整数x,y,z,请把这三个数由小到大输出*/ int main() { system("color 1F"); // 设定显示框为蓝底白字 system("mode con cols=80 lines=30"); //固定显示框尺寸 /************************************ 阅读全文
posted @ 2019-08-23 17:37 狗狗王 阅读(3399) 评论(0) 推荐(0)
摘要: 1 #include<stdio.h> 2 #include<stdlib.h> 3 /*题目:输入某年某月某日,判断这一天是这一年的第几天*/ 4 int main() { 5 system("color 1F"); // 设定显示框为蓝底白字 6 system("mode con cols=80 lines=30"); //固定显示框尺寸 7 /************************ 阅读全文
posted @ 2019-08-23 17:35 狗狗王 阅读(4616) 评论(0) 推荐(0)
摘要: 1 #include<stdio.h> 2 #include<stdlib.h> 3 /*题目:一个整数,它加上100 后是一个完全平方数,再加上168 又是一个完全平方数,请问该数是多少?*/ 4 int main() { 5 system("color 1F"); // 设定显示框为蓝底白字 6 system("mode con cols=80 lines=30"); //固定显示框尺寸 7 阅读全文
posted @ 2019-08-23 17:34 狗狗王 阅读(1180) 评论(0) 推荐(0)
摘要: 1 #include 2 #include 3 /*企业发放的奖金根据利润提成。利润(I)低于或等于10 万元时,奖金可提10%;利润高于10 万元,低于20 万元 4 时,低于10 万元的部分按10%提成,高于10 万元的部分,可可提成7.5%; 20 万到40 万之间时,高于20 万元的部分, 5 可提成5%; 40 万到60 万之间时高于40 万元的部分,可提成3%;60 万到1... 阅读全文
posted @ 2019-08-23 17:33 狗狗王 阅读(5904) 评论(0) 推荐(0)
摘要: 1 #include<stdio.h> 2 #include<stdlib.h> 3 int main() //题目:有1、2、3、4 个数字,能组成多少个互不相同且无重复数字的三位数?都是多少? 4 { 5 system("color 1F"); // 设定显示框为蓝底白字 6 system("mode con cols=80 lines=30"); //固定显示框尺寸 7 /********* 阅读全文
posted @ 2019-08-23 17:31 狗狗王 阅读(2311) 评论(0) 推荐(0)