文档详情

第三版苏小红c语言答案C语言程序设计苏小红版答案.pdf

发布:2024-12-24约4.99千字共11页下载文档
文本预览下载声明

百学须先立志。——朱熹

第三版苏小红c语言答案

C语言程序设计苏小红版

答案

导读:就爱阅读网友为您分享以下“C语言程序设计苏小

红版答案”的资讯,希望对您有所帮助,感谢您对92

的支持!

2.2#includelt;stdio.hgt;

main()

{

floatx=2.5,y=2.5,z=2.5;

printf(quot;x=%f

quot;,x);

printf(quot;y=%f

quot;,y);

1

百学须先立志。——朱熹

printf(quot;z=%f

quot;,z);

}

3.1(1)#includelt;stdio.hgt;

main()

{

inta=12,b=3;

floatx=18.5,y=4.6;

printf(quot;%d

quot;,(float)(a*b)/2);

printf(quot;%d

quot;,(int)x%(int)y);

}

3.2#includelt;stdio.hgt;

2

百学须先立志。——朱熹

main()

{

intx,b0,b1,b2,s;

printf(quot;Inputx:quot;);

scanf(quot;%dquot;,amp;x);

b2=x/100;

b1=(x-b2*100)/10;

b0=x%10;

s=b0*100+b1*10+b2;

printf(quot;s=%d

quot;,s);

}

3

百学须先立志。——朱熹

3.3#includelt;stdio.hgt;

#includelt;math.hgt;

main()

{

floatrate=0.0225;

floatn,capital,deposit;

printf(quot;Inputn,capital:quot;);

scanf(quot;%f,%fquot;,amp;n,amp;capital);

deposit=capital*pow(1+rate,n);

printf(quot;deposit=%f

quot;,deposit);

}

4

百学须先立志。——朱熹

3.4#includelt;stdio.hgt;

#includelt;math.hgt;

main()

显示全部
相似文档