哈尔滨工业大学C语言MOOC在线测试答案文档格式.docx
- 文档编号:5240202
- 上传时间:2023-05-04
- 格式:DOCX
- 页数:116
- 大小:68.54KB
哈尔滨工业大学C语言MOOC在线测试答案文档格式.docx
《哈尔滨工业大学C语言MOOC在线测试答案文档格式.docx》由会员分享,可在线阅读,更多相关《哈尔滨工业大学C语言MOOC在线测试答案文档格式.docx(116页珍藏版)》请在冰点文库上搜索。
以下为程序的运行结果示例:
pleaseinputxandy:
1.2,3.4?
result=13.00
输入格式:
"
%f,%f"
输出格式:
输入提示信息:
"
Pleaseinputxandy:
\n"
输出格式:
Result=%.2f\n"
为避免出现格式错误,请直接拷贝粘贴题目中给的格式字符串和提示信息到你的程序中。
时间限制:
500ms内存限制:
32000kb
#include<
stdio.h>
<
intmain()
{
floatx,y,S,D;
printf("
);
scanf("
&
x,&
y);
Uterinewithinfilmhyperplasiasyndrome,ovariancyst,andtumor(commontype),pelvicinflammatorysexmassuterinewithinfilmcancerthe5casesprostatehyperplasia,prostateinflammatory,prostatecancer,testiculartumor(commontype)cryptorchidism,testiculardevelopmentnotfull,Deputytestosteroneinflammatory,testicularinflammatory,fineSACcyst,finecablevaricoseveins,semencyst,sheathfilmproductliquid,fineSACcyst,finecablereversethe5casescardiovascularsystemcongenitalheart(commontype),rheumaticvalvedisease,expansiontype,andhypertrophytypemyocardialdisease...(Four)aboutnuclearmedicalQuWanyingEditor.nuclearmedicalPeiZhuguoEditor.imagenuclearmedicalChenhaozhuEditor,practicalwithinscienceChinesemedicalwillEditor.clinicaltechnologyoperationspecificationnuclearmedicalfasciclesChinesemedicalwillEditor.clinicalclinicguidenuclearmedicalfasciclesPanZhongyunEditor,clinicalnuclearmedicalWangShizhenEditor,molecularnuclearmedicalparticipationrevisedimplementationrulespersonnelLiMinghua,chenkemin,GengDaoying,LiuShiyuan,songWang,HuBing,XuZhizhang,Zhao,SunXiaoguangamendmentdate:
2010-2-25Medicaltestsectionphysiciantrainingrulesmedicaltestsection(andsaidtestmedicalsection)istodiagnosis,andprevention,andtreatmenthumandiseaseorassessmenthealthprovidesinformationforpurpose,onfromhumanofmaterialforbiology,andmicrobiology,andImmunology,andbiochemistry,andbloodImmunology,andbloodlearn,andbiologicalphysics,andcytology,testofclinicaltwolevelsubject,itslaboratoryworkhastoclinicalprovidestestinformationAdvisory(includingtestresultsexplainedandforfurtherappropriatecheckprovidesrecommends),andparticipationclinical
S=pow(x,2);
D=pow(y,2);
S+D);
return0;
}
2
逆序数的拆分计算(3分)
从键盘输入一个4位数的整数,编程计算并输出它的逆序数(忽略整数前的正负号)。
例如,输入-1234,
忽略负号,由1234分离出其千位1、百位2、十位3、个位4,然后计算4*1000+3*100+2*10+1=4321,
并输出4321。
再将得到的逆序数4321拆分为两个2位数的正整数43和21,计算并输出拆分后的两个数
的平方和的结果。
以下是程序的运行结果示例:
Inputx:
-1234?
y=4321
a=43,b=21
result=2290
%d"
逆序数输出格式:
y=%d\n"
逆序数拆分后的输出格式:
a=%d,b=%d\n"
平方和的输出格式:
result=%d\n"
时间限制:
main()
intx,b0,b1,b2,b3,y,a,b,c;
x);
x=(int)fabs(x);
/*取x绝对值*/
b3=x/1000;
/*取x千位*/
b2=(x-b3*1000)/100;
/*取x百位*/
b1=(x-b3*1000-b2*100)/10;
/*取x十位*/
b0=x%10;
/*取x个位*/
y=b3+b2*10+b1*100+b0*1000;
y);
a=b0*10+b1;
b=b2*10+b3;
c=(a*a)+(b*b);
a,b);
c);
3
拆分英文名(3分)
从键盘输入某同学的英文名(小写输入,假设学生的英文名只包含3个字母。
如:
tom),编写程序在屏幕
上输出该同学的英文名,且首字母大写(如:
Tom)。
同时输出组成该英文名的所有英文字符在26个英文
字母中的序号。
InputyourEnglishname:
tom?
Tom
t:
20
o:
15
m:
13
%c%c%c"
首字母大写的英文姓名的输出格式:
%c%c%c\n"
姓名中每个字母在26个英文字母中的序号的输出格式:
%c:
%d\n"
为避免出现格式错误,请直接拷贝粘贴题目中给的格式字符串和提示信息到你的程序中。
charx,y,z,A;
y,&
z);
A=x-32;
/*首字母改为大写*/
A,y,z);
x,x-96);
y,y-96);
z,z-96);
4
计算体指数(3分)
从键盘输入某人的身高(以厘米为单位,如174cm)和体重(以公斤为单位,如70公斤),将身高(以
米为单位,如1.74m)和体重(以斤为单位,如140斤)输出在屏幕上,并按照以下公式计算并输出体指
数,要求结果保留到小数点后2位。
假设体重为w公斤,身高为h米,则体指数的计算公式为:
Inputweight,height:
70,174?
weight=140
height=1.74
t=23.12
%d,%d"
(注意:
在height和逗号之间有一个空格)体重输出格式:
weight=%d\n"
身高输出格式:
height=%.2f\n"
体指数输出格式:
t=%.2f\n"
s
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 哈尔滨工业大学 语言 MOOC 在线 测试 答案
![提示](https://static.bingdoc.com/images/bang_tan.gif)