liang183 发表于 2016-10-28 19:08:33

《C语言程序设计》(苏小红)课后习题答案高等教育出版社

2.2#include<stdio.h>main(){
floatx=2.5,y=2.5,z=2.5;printf("x=%f\n",x);printf("y=%f\n",y);printf("z=%f\n",z);}
3.1(1)#include<stdio.h>main(){
inta=12,b=3;
floatx=18.5,y=4.6;
printf("%d\n",(float)(a*b)/2);printf("%d\n",(int)x%(int)y);}
3.2#include<stdio.h>main(){
intx,b0,b1,b2,s;printf("Inputx:");scanf("%d",&x);b2=x/100;
b1=(x-b2*100)/10;b0=x%10;
s=b0*100+b1*10+b2;printf("s=%d\n",s);}3.3#include<stdio.h>#include<math.h>main(){
floatrate=0.0225;floatn,capital,deposit;printf("Inputn,capital:");scanf("%f,%f",&n,&capital);deposit=capital*pow(1+rate,n);printf("deposit=%f\n",deposit);}
3.4#include<stdio.h>#include<math.h>main(){
floata,b,c;

**** Hidden Message *****

qiuy 发表于 2017-11-11 19:30:07

答案完整123456

qiuy 发表于 2017-11-11 19:31:53

密码是多少

qiuy 发表于 2017-11-11 19:33:08

密码是多少

砕月桜 发表于 2019-10-29 20:17:05

学习学习学习学习学习
页: [1]
查看完整版本: 《C语言程序设计》(苏小红)课后习题答案高等教育出版社