ImageVerifierCode 换一换
格式:DOCX , 页数:93 ,大小:32.57KB ,
资源ID:17753101      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/17753101.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(C语言程序设计第四版课后答案解析Word文档格式.docx)为本站会员(b****3)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

C语言程序设计第四版课后答案解析Word文档格式.docx

1、 p1=p*(1+r5)*5); #include float d=300000,p=6000,r=,m; m=log10(p/(p-d*r)/log10(1+r);m=%n,m);3-4int c1,c2; c1=197; c2=198;c1=%c,c2=%cn,c1,c2);c1=%d,c2=%dn3-5int a,b; float x,y; char c1,c2;a=%d b=%db);%f %ex,&y);%c%cc1,&c2);a=%d,b=%d,x=%f,y=%f,c1=%c,c2=%cn,a,b,x,y,c1,c2);3-6char c1=C,c2=h,c3=i,c4=n,c5=

2、a; c1=c1+4; c2=c2+4; c3=c3+4; c4=c4+4; c5=c5+4;passwor is %c%c%c%c%cn,c1,c2,c3,c4,c5);3-7int main ()float h,r,l,s,sq,vq,vz; float pi=;请输入圆半径r,圆柱高h%f,%fr,&h); int x,y;输入x:%dx); if(x1) /* x1 */ y=x;x=%3d, y=x=%dn ,x,y); else if(x10) /* 1=x=10 */ y=3*x-11;x=%d, y=3*x-11=%dn4-7-1 int x,y;enter x: y=-1;

3、if(x!=0) if(x0) y=1; else y=0;x=%d,y=%dn4-7-2please enter x:0) y=1; else y=-1;4-8 float score; char grade;请输入学生成绩:%fscore); while (score100|score printf(n 输入有误,请重输 switch(int)(score/10) case 10: case 9: grade=Abreak; case 8:B case 7: case 6:D case 5: case 4: case 3: case 2: case 1: case 0:E成绩是 %,相应的

4、等级是%cn ,score,grade);4-9 int num,indiv,ten,hundred,thousand,ten_thousand,place; .=%dn,sn);5-6 double s=0,t=1; int n; for (n=1;n=20;n+) t=t*n; s=s+t;1!+2!+.+20!=%n,s);5-7 int n1=100,n2=50,n3=10; double k,s1=0,s2=0,s3=0; for (k=1;k=n1;k+) /*计算1到100的和*/ s1=s1+k;=n2;k+) /*计算1到50各数的平方和*/ s2=s2+k*k;=n3;k+

5、) /*计算1到10的各倒数和*/ s3=s3+1/k;sum=%n,s1+s2+s3);5-8 int i,j,k,n;parcissus numbers are for (n=100;1000; i=n/100; j=n/10-i*10; k=n%10; if (n=i*i*i + j*j*j + k*k*k)%d ,n);5-9-1#define M 1000 /*定义寻找范围*/ int k1,k2,k3,k4,k5,k6,k7,k8,k9,k10; int i,a,n,s; for (a=2;a=M;a+) /* a是2-1000之间的整数,检查它是否完数 */ n=0; /* n用

6、来累计a的因子的个数 */ s=a; /* s用来存放尚未求出的因子之和,开始时等于a */ for (i=1;i1) printf(%d,%d,k1,k2); /* n1表示a至少有2个因子 */2) printf(,%d,k3);2表示至少有3个因子,故应再输出一个因子 */ 3) printf(,k4);3表示至少有4个因子,故应再输出一个因子 */4) printf(,k5); /* 以下类似 */5) printf(,k6);6) printf(,k7);7) printf(,k8);8) printf(,k9);9) printf(,k10);5-9-2 int m,s,i; fo

7、r (m=2;m x1=(x2+1)*2; /*第1天的桃子数是第2天桃子数加1后的2倍.*/ x2=x1; day-;total=%dn,x1);5-13 float a,x0,x1;enter a positive number:a); x0=a/2; x1=(x0+a/x0)/2; do x0=x1; while(fabs(x0-x1)=1e-5);The square root of % is %n,a,x1);5-14 double x1,x0,f,f1; x1=; f=(2*x0-4)*x0+3)*x0-6; f1=(6*x0-8)*x0+3; x1=x0-f/f1; while(

8、fabs(x1-x0)The root of equation is %n5-15 float x0,x1,x2,fx0,fx1,fx2;enter x1 & x2:x1,&x2); fx1=x1*(2*x1-4)*x1+3)-6; fx2=x2*(2*x2-4)*x2+3)-6; while(fx1*fx20); x0=(x1+x2)/2; fx0=x0*(2*x0-4)*x0+3)-6; if (fx0*fx1)x=%n,x0);5-16 int i,j,k; for (i=0;=3; for (j=0;jaj) min=j; temp=ai; ai=amin; amin=temp;nTh

9、e sorted numbers:6-3int a33,sum=0;int i,j;3; for (j=0;%3daij); sum=sum+aii;sum=%6dn,sum);6-4 int a11=1,4,6,9,13,16,19,28,40,100; int temp1,temp2,number,end,i,j;array a:10;insert data:number); end=a9; if (numberend) a10=number; for (i=0; if (ainumber) temp1=ai; ai=number;11; temp2=aj; aj=temp1; temp1

10、=temp2;Now array a:6-5#define N 5 int aN,i,temp;enter array a:N;%4dN/2;i+) n,number);continu or not(Y/N)? %c if (c=N|c= flag=0;6-10 int i,j,upp,low,dig,spa,oth; char text380; upp=low=dig=spa=oth=0; printf(please input line %d:,i+1); gets(texti);80 & textij!0 if (textij textij low+;09 dig+; else if (textij= spa+; oth+;nupper case: %dn,upp);lower case:,low);digit :,dig);space :,spa);other :,oth);6-11 char a5=*,; int i,

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1