上一页 1 ··· 50 51 52 53 54 55 56 57 58 ··· 181 下一页
摘要: //题目:古典问题:有一对兔子,从出生后第3个月起每个月都生一对兔子,小兔子长到第三个月后每个月又生一对兔子,假如兔子都不死,问每个月的兔子总数为多少? //1.程序分析: 兔子的规律为数列1,1,2,3,5,8,13,21.... //2.程序源代码: #include "stdio.h" mai 阅读全文
posted @ 2023-02-27 22:00 myrj 阅读(36) 评论(0) 推荐(0) 编辑
摘要: //题目:输入某年某月某日,判断这一天是这一年的第几天? //1.程序分析:以3月5日为例,应该先把前两个月的加起来,然后再加上5天即本年的第几天,特殊情况,闰年且输入月份大于3时需考虑多加一天。 //2.程序源代码: #include "stdio.h" main() { int day,mont 阅读全文
posted @ 2023-02-27 21:47 myrj 阅读(189) 评论(0) 推荐(0) 编辑
摘要: //题目:企业发放的奖金根据利润提成。利润(I)低于或等于10万元时,奖金可提10%;利润高于10万元,低于20万元时,低于10万元的部分按10%提成,高于10万元的部分,可可提成7.5%;20万到40万之间时,高于20万元的部分,可提成5%;40万到60万之间时高于40万元的部分,可提成3%;60 阅读全文
posted @ 2023-02-27 21:44 myrj 阅读(89) 评论(0) 推荐(0) 编辑
摘要: //题目:一个整数,它加上100后是一个完全平方数,再加上168又是一个完全平方数,请问该数是多少? //1.程序分析:在10万以内判断,先将该数加上100后再开方,再将该数加上268后再开方,如果开方后的结果满足如下条件,即是结果。请看具体分析: //2.程序源代码: #include "math 阅读全文
posted @ 2023-02-27 21:42 myrj 阅读(191) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> main() { 【1】 ch[80]; int i; printf("请输入一个字符串:"); gets(【2】); for(i=0;ch[i]!= '【3】';i++) { if(ch[i]>='A'【4】ch[i]<='Z') ch[i]=ch[i]+32 阅读全文
posted @ 2023-02-27 09:38 myrj 阅读(171) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> main() { int year,flag; printf("请输入年份:"); 【1】; 【2】 printf("年份超出范围。"); else { if(year%4==0) { 【3】 { if(year%400==0) flag=1; 【4】 flag 阅读全文
posted @ 2023-02-27 09:34 myrj 阅读(66) 评论(0) 推荐(0) 编辑
摘要: //题目:编程求输出所有符合以下特点4位数,这个数是否具有以下特点:这数本身是平方数,且其低2位和高2位所组成的2个2位数也是平方数。 //要求:使用程序中定义的变量 #include <stdio.h> #include <math.h> main(){ int qw,bw,sw,gw; // q 阅读全文
posted @ 2023-02-27 06:56 myrj 阅读(272) 评论(0) 推荐(0) 编辑
摘要: #include "stdio.h" //有1、2、3、4个数字,能组成多少个互不相同且无重复数字的三位数?都是多少? 每行显示5个 main() { int i,j,k,count=0; for(i=1;i<5;i++) for(j=1;j<5;j++) for (k=1;k<5;k++) { i 阅读全文
posted @ 2023-02-27 06:17 myrj 阅读(44) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> //任意输入两个整数,输出这两个数的最小公倍数 main() { int a,b,c,gys,gbs; scanf("%d%d",&a,&b) ; for(c=1;c<=a*b;c++) { if(c%a==0&& c%b==0) { gbs=c; break; 阅读全文
posted @ 2023-02-26 19:59 myrj 阅读(115) 评论(0) 推荐(0) 编辑
摘要: //原数据状态 des // Contains data from D:\Stata17\ado\base/a/auto.dta // Observations: 74 1978 automobile data // Variables: 12 13 Apr 2020 17:45 // (_dta 阅读全文
posted @ 2023-02-26 16:16 myrj 阅读(178) 评论(0) 推荐(0) 编辑
上一页 1 ··· 50 51 52 53 54 55 56 57 58 ··· 181 下一页