全球旧事资料 分类
c语言程序设计教程第二版课后习题答

【篇一:c语言程序设计教程_李含光_郑关胜_清华大学出版社习题答案习题答案完美打印版】
1.单项选择题(1)a(2)c(3)d(4)c(5)b2.填空题(1)函数(2)主函数(mai
)(3)pri
tf,sca
f第2章习题参考答案1.单项选择题15cbccc610cdcdc1113dbb2.填空题(1)1(2)26(3)6,4,2(4)106(5)3000000(6)双精度(double)(7)9(8)字母,数字,下划线(9)13700000(10)11(11)((m10)10)100(m100)10m10(12)0(13)10,9,11(15)x0y0x0z0y0z0(16)double(17)x0(18)sqrtfabsab3ab(19)sqrtxxyyab第3章习题参考答案1.单项选择题15cccdd610bcdbc1115bcbbb16a2.填空题(1)用;表示结束(2)(3)yx01x001(4)y40y1000y4000(5)上面未配对(6)default标号(7)while,dowhile,for(8)dowhile(9)本次(10)本层3.阅读程序,指出结果(1)yes(2)(3)abother(4)2870(5)2,0(6)8(7)36(8)1(9)3,1,1,3,1,1(10)a12,y12(11)i6,k4(12)1,24.程序填空(1)x:y,u:z(2)m
,m!0,mm10(3)tepst
2
1pri
tf“lf
”2s(4)m50,pri
tf“d
”k(5)cxgetcharcxfro
tcx(6)doubles010klf(7)s0sgmi
5.编程题(1).i
cludestdiohi
tmai
doublexysca
flfxifx1yx
felseifx10x10y2x11elsey3x11pri
tflf
yretur
0(2).
i
cludestdiohi
tmai
doublexyzmi
sca
flflflfxyzifxymi
yelsemi
xifmi
zmi
zpri
tfmi
lf
mi
retur
0(3).
i
cludestdiohi
tmai
i
tymdflags0wisca
fdddymdflagy40y1000y4000wy1365y14y1100y14007fori1imiswitchicase1sdbreakcase2s31dbreakcase3s59dbreakcase4s90dbreakcase5s120dbreakcase6s151dbreakcase7s181dbreakcase8s212dbreakcase9s243dbreakcase10s273dbreakcase11s304dbreakcase12s334dbreak}
sws7ifs0pri
tf星期日
elsepri
tf星期d
sretur
0(4).
i
cludestdiohi
tmai
floatprsca
ffpifp10rp01elseifp10p20r1001p100075elseifp20p40r1001100075p20005elseifp40p60r100110007520005p40003elseifp60p100r10011000752000520003p600015elseifp100r10011000752000520003400015p100001pri
tff
rretur
0(5).
i
cludestdiohi
tmai
charcwhilecgetchar

fifcaczcc32putcharcretur
0(6).
i
cludestdiohi
tmai
i
tmk2pri
tf输r
好听全球资料 返回顶部