c程序的设计(第四版)谭浩强_课后习题答案_共11章.docx

c程序的设计(第四版)谭浩强_课后习题答案_共11章.docx

1-5 #include stdio.h int main ( ) printf ( **\n\n); printf( Very Good!\n\n); printf ( **\n); return 0; } 1-6 #include stdio.h int main() {int a,b,c,max; printf(please input a,b,c:\n); scanf(%d,%d,%d,a,b,c); max=a; if (maxb) max=b; if (maxc) max=c; printf(The largest number is %d\n,max); return 0; } 3-1 #include stdio.h #include math.h int main() {float p,r,n; r=0.1; n=10; p=pow(1+r,n); printf(p=%f\n,p); return 0; } 3-2-1 #include stdio.h #include math.h int main() {float r5,r3,r2,r1,r0,p,p1,p2,p3,p4,p5; p=1000; r5=0.0585; r3=0.054; r2=0.0468; r1=0.0414; r0=0.0072; p1=p*((1+r5)*5); p2=p*(1+2*r2

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档