电子文档交易市场
安卓APP | ios版本
电子文档交易市场
安卓APP | ios版本
换一换
首页 金锄头文库 > 资源分类 > DOC文档下载
分享到微信 分享到微博 分享到QQ空间

19年6月西南大学[1032]《C语言程序设计》大作业参考资料

  • 资源ID:90413021       资源大小:59.50KB        全文页数:9页
  • 资源格式: DOC        下载积分:5金贝
快捷下载 游客一键下载
账号登录下载
微信登录下载
三方登录下载: 微信开放平台登录   支付宝登录   QQ登录  
二维码
微信扫一扫登录
下载资源需要5金贝
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
如填写123,账号就是123,密码也是123。
支付方式: 支付宝    微信支付   
验证码:   换一换

 
账号:
密码:
验证码:   换一换
  忘记密码?
    
1、金锄头文库是“C2C”交易模式,即卖家上传的文档直接由买家下载,本站只是中间服务平台,本站所有文档下载所得的收益全部归上传人(卖家)所有,作为网络服务商,若您的权利被侵害请及时联系右侧客服;
2、如你看到网页展示的文档有jinchutou.com水印,是因预览和防盗链等技术需要对部份页面进行转换压缩成图而已,我们并不对上传的文档进行任何编辑或修改,文档下载后都不会有jinchutou.com水印标识,下载后原文更清晰;
3、所有的PPT和DOC文档都被视为“模板”,允许上传人保留章节、目录结构的情况下删减部份的内容;下载前须认真查看,确认无误后再购买;
4、文档大部份都是可以预览的,金锄头文库作为内容存储提供商,无法对各卖家所售文档的真实性、完整性、准确性以及专业性等问题提供审核和保证,请慎重购买;
5、文档的总页数、文档格式和文档大小以系统显示为准(内容中显示的页数不一定正确),网站客服只以系统显示的页数、文件格式、文档大小作为仲裁依据;
6、如果您还有什么不清楚的或需要我们协助,可以点击右侧栏的客服。
下载须知 | 常见问题汇总

19年6月西南大学[1032]《C语言程序设计》大作业参考资料

<p>西南大学网络与继续教育学院课程考试试题卷类别:网教 &nbsp; &nbsp; &nbsp;专业:电力系统自动化技术 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;2019年6月课程名称【编号】:C语言程序设计【1032 】 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;A卷大作业 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;满分:100 分一、问答题(从2小题中任选1小题完成,每小题20分,共20分)1、简述算法的概念及其特点,同时请画出求s=1+2+3+10之值的算法流程图。2、在VC环境下,调试程序的基本步骤有哪些?调试程序中常见的错误有哪些?如何解决发现这些错误?二、分析程序,写出运行结果(从3小题中任选2小题完成,每小题10分,共20分)1.#include &quot;stdio.h&quot; void &nbsp;sort(int x ,int n) &nbsp;int i,j,k,t; &nbsp; for(i=0;i&lt;n-1;i+)k=i; for(j=i+1;j</p><n;j+)>xj)k=j; &nbsp;if(i!=k) &nbsp;t=xk;xk=xi;xi=t; &nbsp; &nbsp;void main( ) &nbsp;int a10=44,50,89,67,103,8,75,30,125,150,i; &nbsp; sort(a,10); &nbsp; for(i=0;i&lt;10;i+)printf(&quot;%10d&quot;,ai); &nbsp;2.#include<stdio.h>void main()&nbsp; char n;int a=100,b=20;for(n=&#39;a&#39;n&lt;=&#39;d&#39;n+=2)switch(n)case &#39;a&#39;:printf(&quot;a+b=%dn&quot;,a+b);break;case &#39;b&#39;:printf(&quot;a-b=%dn&quot;,a-b);break;case &#39;c&#39;:printf(&quot;a*b=%dn&quot;,a*b);break;case &#39;d&#39;:printf(&quot;a/b=%dn&quot;,a/b);break;3、#include<stdio.h>void main()int m,n;for(m=1;m&lt;=3;m+)for(n=1;n&lt;=2*m-1;n+)printf(&quot;*&quot;);printf(&quot;n&quot;);三、程序设计题(从5小题中任选4小题完成,每小题15分,共60分)1. 从键盘输入一个正整数n,若能同时被4和5整除,则输出“Yes”,否则输出“No”。2. 从键盘上输入x,依据公式计算y的 值。要求有输入输出提示,计算结果精度为3。3. 编写程序找出200以内能够被7整除的所有整数,并输出结果。4. 利用循环结构输出下列图形。12223333344444445.编一程序找出所有三位整数的&quot;水仙花数”并输出结果。其中&quot;水仙花数”是指一个三位数,其各位数字立方和等于该数本身。例如:153是一&quot;水仙花数”,因为153=13+53+33。一、问答题1、答:计算机中的算法是对特定问题求解步骤的一种描述,它是指令的有限序列。确定性,有穷性,可行性是算法的基本特征。2、答: 在VC 环境下,调试程序的基本步骤有编辑、编译、连接、执行 调试程序中常见的错误有语法错误和逻辑错误。其中语法错误通过编译来实现,逻辑错误通过单步 追踪和设置断点的方法来发现逻辑错误。二、分析程序,写出运行结果1、答:运行结果:8 30 44 50 67 75 89 103 125 1502、答:运行结果:a+b=120 &nbsp;a*b=2000三、程序设计题1、#include stdio.h#include stdlib.hvoid main()int n;scanf(&#39;%d&#39;,&amp;n);if(n%4=0&amp;&amp;n%5=0) &nbsp; printf(&#39;Yes&#39;);elseprintf(&#39;No&#39;);2、#include stdio.h#include stdlib.h#include math.h void main()printf(&#39;请输入x,代入公式计算y&#39;);int x;scanf(&#39;%d&#39;,&amp;x);float &nbsp;y=sqrt(pow(x+1,2)+2)/(3*abs(x);printf(&#39;y保留三位小数结果是:%.3fn&#39;,a);3、答:#include stdio.h#include stdlib.hvoid main() &nbsp; &nbsp;int n; &nbsp; &nbsp;for(n=0;n200;n+) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(n%7=) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;printf(&#39;%dn&#39;,n); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;4、答:#include stdio.h#include stdlib.hvoid main() &nbsp; &nbsp;int n,k; &nbsp; &nbsp;for(n=1;n5;n+) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for(k=0;k=(n-1)*2;k+)/1,3,5,7. 次数 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; printf(&#39;%d&#39;,n); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;printf(&#39;n&#39;);5、答:#include&nbsp;stdio.h#include&nbsp;stdlib.hvoid&nbsp;main()&nbsp;&nbsp;&nbsp;&nbsp;int&nbsp;i,j,k,n;&nbsp;&nbsp;&nbsp;&nbsp;printf(&#39;水仙花数:&#39;);&nbsp;&nbsp;&nbsp;&nbsp;for(n=100;n999;n+)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;i=n/100;/*分解出百位*/&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;j=n/10%10;/*分解出十位*/&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;k=n%10;/*分解出个位*/&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(n=i*i*i+j*j*j+k*k*k)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(&#39;%-5d&#39;,n);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(&#39;n&#39;); - 9 -</stdio.h></stdio.h></n;j+)>

注意事项

本文(19年6月西南大学[1032]《C语言程序设计》大作业参考资料)为本站会员(乔158****1983)主动上传,金锄头文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即阅读金锄头文库的“版权提示”【网址:https://www.jinchutou.com/h-59.html】,按提示上传提交保证函及证明材料,经审查核实后我们立即给予删除!

温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




关于金锄头网 - 版权申诉 - 免责声明 - 诚邀英才 - 联系我们
手机版 | 川公网安备 51140202000112号 | 经营许可证(蜀ICP备13022795号)
©2008-2016 by Sichuan Goldhoe Inc. All Rights Reserved.