- 1、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
Q308. (10 分)第 5 章 实验 2:体型判断。 医务工作者经广泛的调查和统计分析,根据身高与体重因素给出了以下按“体指数”进行体型判断的方法。体指数计算公式是: t = w /(h*h)其中:t 是体指数;w 是体重,其单位为千克;h 是身高,其单位为米。根据给定的体指数 t 计算公式,可判断你的体重属于何种类型:当 t18 时,为低体重;当 t = w /(h*h) 其中:t 是体指数;w 是体重,其单位为千克;h 是身高,其单位为米。根据给定的体指数 t 计算公式,可判断你的体重属于何种类型: 当 t18 时,为低体重; 当 18≤t25 时,为正常体重; 当 25≤t27 时,为超重体重; 当 t≥27 时,为肥胖。 ****输入提示信息格式:Please enter h,w:\n ****输入数据格式要求:%f,%f(先读入身高,再读入体重,身高以米读入, 体重以千克读入) ****输出数据格式要求: 当 t18 时,输出:Lower weight!\n 当 18≤t25 时,输出:Standard weight!\n 当 25≤t27 时,输出:Higher weight!\n 当 t≥27 时, 输出:Too fat!\n #include stdio.h #include stdlib.h main() { floatt,w,h; printf(Please enter h,w:\n); scanf(%f,%f,h,w); t = w/(h*h); if(t18) printf(Lower weight!\n); elseif(t=18t25) printf(Standard weight!\n); elseif(t=25t27) printf(Higher weight!\n); else printf(Too fat!\n); return0; } Q586. ( 10 分)编写一个程序,输入年份和月份,判断该年是否是闰年,并根据给出的月 份判断是什么季节和该月有多少天?(闰年的条件是年份能被 4 整除但不能被100 整除,或者能被 400 整除;规定 3~5 月为春季,6~8 月为夏季,9~11 月为秋季,1、2 和 12 月为冬季)。 **输入格式要求:%d,%d 提示信息:Please enter year,month: **输出格式要求:%d is leap year\n%d is not leap year\nThe season is spring/summer/autumn/winterThe number of days of this month is %d\n 程序运行示例如下:实例 程序运行示例如下: 实例 1: Please enter year,month:2012,11 2012 is leap year The season is autumn The number of days of this month is 30 实例 2: Please enter year,month:2013,12 2013 is not leap yearThe season is winterThe number of days of this month is 31 2013 is not leap year The season is winter The number of days of this month is 31 #include stdio.h #include stdlib.h main() { intyear=0,leap=0,mon=0,day=0; printf(Please enter year,month:); scanf(%d,%d,year,mon); if((year%100!=0year%4==0)||(year%100==0year%400==0)){ printf(%d is leap year\n,year); leap=1; } else printf(%d is not leap year\n,year); switch(mon) { case 1: case 2: case12:printf(The season is winter\n); break; case 3: case 4: case 5:printf(The season is spring\n); break; case6: case 6: case 7: case 8:printf(The season is summer\n); break; case 9: case10: case11:printf(The season is autumn\n); b
您可能关注的文档
- 2021小学假期寒假作业实践作业布置实践方案合辑(完整版).docx
- 2021小学学生分层作业管理制度与实施方案(详细版).docx
- 2021小学作业管理实施方案范本(完整版).docx
- 2021小学劳动教育实施方案范本(完整版).docx
- 2021小学关于落实五项管理措施致家长的一封信告家长书(范本).docx
- 2021小学家务劳动教育活动方案家务劳动教育方案(完整版).docx
- 2021小学寒假假期活动安排社会实践活动方案合辑(必威体育精装版版).docx
- 2021小学开展“双减”工作实施方案(更新版).docx
- 2021小学寒假综合实践活动假期综合实践活动方案合辑(详细版).docx
- 2021小学暑期特色作业范本(必威体育精装版版).docx
文档评论(0)