C语言程序设计第三版谭浩强课后习题答案完整版.docx
《C语言程序设计第三版谭浩强课后习题答案完整版.docx》由会员分享,可在线阅读,更多相关《C语言程序设计第三版谭浩强课后习题答案完整版.docx(19页珍藏版)》请在第一文库网上搜索。
1、1.5#include void main()printf(Very good!printf(); I II 不干不干干不干不干不不干不不不不不不干不干不干不不不不不不不不不Uery good?圣兴兴兴兴兴兴兴兴兴兴兴兴兴兴兴兴兴兴兴兴兴兴兴兴兴兴兴兴兴兴兴兴Press any key to continue1.6#include void main()(float max(float x,float y,float z);float a,b,c;printf(”请分别输入 a,b,c:n);scanf(%f,%f,%f,&a,&b,&c);printf(Mmax=%fmax(a,b5c);)
2、float max(float x,float y,float z)(float m,n;m=xy? x: y;n=mz? m: z;return(n);靖分另J输入b,c :1.2,2.3,0.6pax=2.300000Press any key to continue3.6#include void main()(charcl=, a, ,c2=, b ,c3= c, ,c4=, 101, ,c5=, 116,;printf( *a%c b%ctc%ctabcn, ,cl,c2,c3);rintf( tb%c %cnv ,c4,c5);Ea bbcc abcnress any key to
3、 continue#include void main()(double x=2.5,y=4.7,z;int a=7;z=x+a%3*(int)(x+y)%2/4;printff该表达式的值为:%f;z);表达式的值为: 2.500000Press any key to continue#include void main()(int a=2,b=3;float x=3.5,y=2.5,z;z=(float)(a+b)/2+(int)x%(int)y;printf(该表达式的值为:%f,z);该表达式的值为:3.500000Press any key to continue4.5#includ
4、e void main()(int a=5, b=7;double x=67. 8564, y=-789. 124;char c=, A,;long n=1234567;unsigned u=65535;printf (%d%dn”, a, b);printf (zz%3d%3dn,z, a, b);printf (z,%f, %fn,x, y);printf (z,%-10f, %T0fn”, x, y);printf C%8. 2f, %8. 2f, %. 4f, %. 4f, %3f, %3fr, x, y, x, y, x, y);printf (,/%e, %10. 2en”, x,
5、 y);printf (z,%c, %d, %o, %xn”, n, n, n);printf (z,%ld, %lo, %xn”, n, n, n);printf (,%u, %o, %x, ln”, u, u, u, u);printfC%s, %5. 3sn,“COMPUTER, COMPUTER);575 767.856400,-789.12400067.856400 ,-789.12400067.86, -789.12,67.8564,-789.1240,67.856400,-789.1240006. 785640e+001,-7.89e+00271234567,4553207,25
6、21241234567,4553207,12d68765535,177777,ffff,65535COMPUTER. COMPress any key to continue4.6#include void main()(int a, b;float x, y;char cl,c2;scanf (zza=%d b=%c, &a, &b);scanf ( %f %e”, &x, &y);scanf (,z %c %cz, &cl, &c2);卜=3 b=7 8.5 7.182e001 A aPress any key to continue4.7#includevoid main()(int a
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 语言程序设计 第三 版谭浩强 课后 习题 答案 完整版