C語言程序設(shè)計(jì)第三版譚浩強(qiáng)課后習(xí)題答案完整版(完整版).doc
C語言程序設(shè)計(jì)第三版譚浩強(qiáng)課后習(xí)題答案完整版(完整版)(文檔可以直接使用,也可根據(jù)實(shí)際需要修改使用,可編輯 歡迎下載) .5C * Very Good! * mian() printf(*); printf(n); printf(Very Good!n); printf(n); printf(*); .6 abc mian() int a,b,c,max; printf(a,b,c:n); scanf(%d,%d,%d,&a,&b,&c); max=a; if(maxb) max=b; if(maxc) max=c; printf(%d,max); 3.6 main() char c=a,c=b,c3=c,c4=0,c5=6; printf(a%cb%ctc%ctabcn,c,c,c3); printf(tb%c %c,c4,c5); aabbccabc AN 3.7China4A4EEAChinaGlmreclcc3c4c5Chinaccc3c4c5Glmre #include main() char c=C,c=h,c3=i,c4=n,c5=a; c+=4; c+=4; c3+=4; c4+=4; c5+=4; printf(%c%c%c%c%cn,c,c,c3,c4,c5); Glmre 3.9 x+a%3*(int)(x+y)%/4 x=.5,a=7,y=4.7 (float)(a+b)/+(int)x%(int)y a=,b=3,x=3.5,y=.5 .5 3.5 3.0 main() int i,j,m,n; i=8; j=0; m=+i; n=j+; printf(%d,%d,%d,%d,i,j,m,n); 990 3. aa=an a+=a a-= 3 a*=+3 4a/=a+a 5 a%=(n%=)n5 6a+=a-=a*=a () 4 () 0 (3) 60 (4) 0 (5) 0 (6) 0 44a=3b=4c=5x=.y=.4z=-3.6u=574n=8765c=ac=b a=_3_ _b=_4_ _c=_5 x=.00000,y=.400000,z=-3.600000 x+y=_3.600_ _y+z=-.0_ _z+x=-.40 c=a_or_97(ASCII) c=b_or_98(ASCII) main() int a=3,b=4,c=5; long int u=574,n=8765; float x=.,y=.4,z=3.6; char c=a,c=b; printf(a=%d b=%d c=%dn,a,b,c); printf(x=%f,y=%f,z=%fn,x,y,z); printf(x+y=%5.f y+z=%5.f z+x=%5.fn,x+y,y+z,z+x); printf(u=%6ld n=%9ldn,u,n); printf(%s %s %d%sn,c=a,or,c,(ASCII); printf(%s %s %d%sn,c=a,or,c,(ASCII); 47scanfa=3b=7x=8.5y=7.8c=Ac=a main() int abfloat xychar cc scanfa=%d_b=%d&a&b scanf_x=%f_y=%e,&x&y scanf_c=%c_c=%c&c&c a=3_b=7 _x=8.5_y=7.8 _c=A_c=a 48r=.5h=3scanf main() float r,h,C,Sa,Sb,Va,Vb; scanf(%f,%f,&r,&h); C=*3.4*r; Sa=3.4*r*r; Sb=4*Sa; Va=4*3.4*r*r*r/3; Vb=Sa*h; printf(C=%.fn,C); printf(Sa=%.fnSb=%.fnVa=%.fnVb=%.fn,Sa,Sb,Va,Vb); 49 c=5(F-3)/9 main() float F,c; scanf(%f,&F); c=5*(F-3)/9; printf(c=%.f,c); 40getcharccccccASCIIputcharprintf charcc intcc #includestdio.h main() char c,c; c=getchar();c=getchar(); putchar(c);putchar(n);putchar(c);putchar(n); #includestdio.h main() char c,c; c=getchar();c=getchar(); printf(c=%d c=%dn,c,c); printf(c=%c c=%cn,c,c); 5. 5. C 0003&53&5 5.3 a=3b=4c=5 () a+bc&b=c () a|b+c&b-c (3) !(ab)&!c| (4) !(x=a)&(y=b)&0 (5) !(a+b)+c-&b+c/ () 0 () (3)
編號(hào):30438064
類型:共享資源
大?。?span id="yeyowi7" class="font-tahoma">1.08MB
格式:DOC
上傳時(shí)間:2023-04-18
40
積分
積分
- 關(guān) 鍵 詞:
- 語言程序設(shè)計(jì) 第三 版譚浩強(qiáng) 課后 習(xí)題 答案 完整版
- 資源描述:
-
C語言程序設(shè)計(jì)第三版譚浩強(qiáng)課后習(xí)題答案完整版(完整版) (文檔可以直接使用,也可根據(jù)實(shí)際需要修改使用,可編輯 歡迎下載) £±.5??2???±???àyìa£?±àD′£-??C3ìDò£?ê?3?ò???D??¢£o ************************** Very Good! ************************** ?a£o mian() {printf("**************************"); printf("\n"); printf("Very Good!\n"); printf("\n"); printf("**************************"); } £±.6 ±àD′£-??3ìDò£?ê?è?a?¢b?¢cèy???μ£?ê?3????D×?′ó?μ?£ ?a£o mian() {int a,b,c,max; printf("??ê?è?èy??êya,b,c:\n"); scanf("%d,%d,%d",&a,&b,&c); max=a; if(max main() { char c£±='C',c£2='h',c3='i',c4='n',c5='a'; c£±+=4; c£2+=4; c3+=4; c4+=4; c5+=4; printf("?ü??ê?%c%c%c%c%c\n",c£±,c£2,c3,c4,c5); } ??DD?á1?£o ?ü??ê?Glmre 3.9?ó??????ê?±í′?ê?μ??μ?£ £¨£±£?x+a%3*(int)(x+y)%£2/4 éèx=£2.5,a=7,y=4.7 £¨£2£?(float)(a+b)/£2+(int)x%(int)y éèa=£2,b=3,x=3.5,y=£2.5 £¨£±£?£2.5 £¨£2£?3.5 3.£±0D′3?3ìDò??DDμ??á1??£ main() {int i,j,m,n; i=8; j=£±0; m=++i; n=j++; printf("%d,%d,%d,%d",i,j,m,n); } ?a£o 9£?£±£±£?9£?£±0 3.£±£2 D′3?????±í′?ê?????oóa(chǎn)μ??μ£?éè?-à′a=£±£2?£éèaoín??ò??¨ò??a??Dí±?á??£ £¨£±£?a+=a £¨£2£? a-=£2 £¨3£? a*=£2+3 £¨4£?a/=a+a £¨5£? a%=(n%=£2)£?nμ??μμèóú5 £¨6£?a+=a-=a*=a ?a£o (£±) £24 (£2) £±0 (3) 60 (4) 0 (5) 0 (6) 0 μú???? 4£?4è?a=3£?b=4£?c=5£?x=£±.£2£?y=£2.4£?z=-3.6£?u=5£±£274£?n=£±£28765£?c£±='a'£?c£2='b'?£??μ?μ?ò???ê?3???ê?oí?á1?£???D′3?3ìDò£¨°üà¨?¨ò?±?á?ààDíoíéè??ê?3?£??£ a=_3_ _b=_4_ _c=_5 x=£±.£200000,y=£2.400000,z=-3.600000 x+y=_3.600_ _y+z=-£±.£20_ _z+x=-£2.40 c£±=¨@a¨@_or_97(ASCII) c£2=¨@b¨@_or_98(ASCII) main() {int a=3,b=4,c=5; long int u=5£±£274,n=£±£28765; float x=£±.£2,y=£2.4,z=3.6; char c£±='a',c£2='b'; printf("a=%£2d b=%£2d c=%£2d\n",a,b,c); printf("x=%f,y=%f,z=%f\n",x,y,z); printf("x+y=%5.£2f y+z=%5.£2f z+x=%5.£2f\n",x+y,y+z,z+x); printf("u=%6ld n=%9ld\n",u,n); printf("%s %s %d%s\n","c£±='a'","or",c£±,"(ASCII)"); printf("%s %s %d%s\n","c£2='a'","or",c£2,"(ASCII)"); } 4£?7ó?scanf????μ?oˉêyê?è?êy?Y£?ê1a=3£?b=7£?x=8.5£?y=7£±.8£2£?c£±=¨@A¨@£?c£2=¨@a¨@£??ê?ú?ü?ìé?è?o?ê?è?£? main() { int a£?b£?float x£?y£?char c£±c£2£? scanf£¨"a=%d_b=%d"£?&a£?&b£?£? scanf£¨"_x=%f_y=%e",&x£?&y£?£? scanf£¨"_c£±=%c_c£2=%c"£?&c£±£?&c£2£?£? } a=3_b=7 _x=8.5_y=7£±.8£2 _c£±=A_c£2=a 4£?8éè?2°???r=£±.5£??2?ù??h=3£??ó?2?ü3¤?¢?2???y?¢?2?ò±í???y?¢?2?òì??y?¢?2?ùì??y?£ó?scanfê?è?êy?Y£?ê?3??????á1?£?ê?3?ê±òa?ó??×??μ?÷£?è?D?êyμ?oóá???êy×??£??±à3ìDò?£ main() {float r,h,C£±,Sa,Sb,Va,Vb; scanf("%f,%f",&r,&h); C£±=£2*3.£±4*r; Sa=3.£±4*r*r; Sb=4*Sa; Va=4*3.£±4*r*r*r/3; Vb=Sa*h; printf("C£±=%.£2f\n",C£±); printf("Sa=%.£2f\nSb=%.£2f\nVa=%.£2f\nVb=%.£2f\n",Sa,Sb,Va,Vb); } 4£?9ê?è?£-???aê????è£?òa?óê?3?é?ê????è?£1?ê??a c=5(F-3£2)/9 ê?3?òa?óóD??×??μ?÷£?è???£2D?êy?£ main() {float F,c; scanf("%f",&F); c=5*(F-3£2)/9; printf("c=%.£2f",c); } 4£?£±0±à3ìDò£?ó?getcharoˉêy?áè?á???×?·???c£±?¢c£2£?è?oó·?±eó?oˉêyoíoˉêyê?3??aá???×?·??£2¢????ò????êìa£o£¨£±£?±?á?c£±?¢c£2ó|?¨ò??a×?·?Dí?ò??D?£?ò??t?????é£?£¨£2£?òa?óê?3?c£±oíc£2?μμ?ASCII??£?ó|è?o?′|àí£?ó?putcharoˉêy?1ê?printfoˉêy£?£¨£3£???D?±?á?ó?×?·?±?á?ê?·??úè?o??é???????éò??¥?à′úì?£?è?£o char??c£±£?c£2£? ó? int??c£±£?c£2£? ê?·??Tì??tμ?μè??£? #include"stdio.h" main() {char c£±,c£2; c£±=getchar();c£2=getchar(); putchar(c£±);putchar('\n');putchar(c£2);putchar('\n'); } #include"stdio.h" main() {char c£±,c£2; c£±=getchar();c£2=getchar(); printf("c£±=%d c£2=%d\n",c£±,c£2); printf("c£±=%c c£2=%c\n",c£±,c£2); } μú???? 5.£± ê2?′ê???ê?????£?ê2?′ê?1??μ????£?ê2?′ê????-????£? ?a£o???£ 5.£2 Có????Dè?o?±íê?"??"oí"?ù"£??μí3è?o??D??£-??á?μ?"??"oí"?ù"£? ?a£oéèóD£-?????-±í′?ê?£?è????á1??a"??"£??òò?£±±íê?£?è????á1??a"?ù"£??òò?0±íê??£μ?ê??D??£-?????-á?μ??μê±£?ò?0′ú±í"??"£?ò?·?0′ú±í"?ù"?£àyè?3&&5μ??μ?a"??"£??μí3??3?3&&5μ??μ?a£±?£ 5.3 D′3??????÷???-±í′?ê?μ??μ?£éèa=3£?b=4£?c=5?£ (£±) a+b>c&&b==c (£2) a||b+c&&b-c (3) !(a>b)&&!c||£± (4) !(x=a)&&(y=b)&&0 (5) !(a+b)+c-£±&&b+c/£2 ?a£o (£±) 0 (£2) £± (3) £±展開閱讀全文
匯文網(wǎng)所有資源均是用戶自行上傳分享,僅供網(wǎng)友學(xué)習(xí)交流,未經(jīng)上傳用戶書面授權(quán),請(qǐng)勿作他用。
關(guān)于本文
本文標(biāo)題:C語言程序設(shè)計(jì)第三版譚浩強(qiáng)課后習(xí)題答案完整版(完整版).doc
鏈接地址:http://zhizhaikeji.com/p-30438064.html
鏈接地址:http://zhizhaikeji.com/p-30438064.html