c语言开发入门与项目实战练习(introduction to c language development and practice of project practice)

c语言开发入门与项目实战练习(introduction to c language development and practice of project practice)

ID:15496371

大小:24.94 KB

页数:35页

时间:2018-08-03

c语言开发入门与项目实战练习(introduction to c language development and practice of project practice)_第1页
c语言开发入门与项目实战练习(introduction to c language development and practice of project practice)_第2页
c语言开发入门与项目实战练习(introduction to c language development and practice of project practice)_第3页
c语言开发入门与项目实战练习(introduction to c language development and practice of project practice)_第4页
c语言开发入门与项目实战练习(introduction to c language development and practice of project practice)_第5页
资源描述:

《c语言开发入门与项目实战练习(introduction to c language development and practice of project practice)》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、c语言开发入门与项目实战练习(IntroductiontoClanguagedevelopmentandpracticeofprojectpractice)1.输出一个n!#includesstdio.h>

2、个数while(num++<=2);printf("%d",n);循环体是空语句,退出循环后输出num的值cx=-3;while(x>5).先执行循环体x*=-3,再判断条件(x>5)forn=0;n<26;n++)printf("%c",n+a).作用是输出26个大写字母for(sum=0,i=1,the<=100;sum=sum+1,i+=2);作用是计算100以内的奇数和3.数值解法计算某点附近的根#includesstdio.h><#includes"math.h"main()(floatx,x0,f,f1.printf("输入的初始根x0=");scanf("

3、%f",&x);x=1.5;igive{x0=x;f=2*x0*x0*x0+4*x0*x0-7*x0-6;f1=6*x0*x0+8*x0-7.x=x0-f/f1.}while(twoyearsago(x-x0)>1-6).printf("%f",x);}4.编程序求2~10000以内的完全数完全数:一个数的因子(除了这个数本身)之和等于该数本身.main(){inti,j,s;for(i=2;the<=10000;i++){s=0;for(j=1;j

4、ncludesstdio.h>='&&ch<=z)ch=ch+32.printf("%c",ch);}6.比较两个数的大小#includesstdio.h>y)printf(x>y");elseif(x-y)printf(x

5、i=1,the<=9;i++){(sum=sum+1)*2);}printf("%d",sum);}8.求100-200之间的素数#includesstdio.h><#includesstdlib.h>

6、ntc;for(c=0andc<10;c++){srand(c+2).printf("随机发生数%d是:%d",c,rand());}}10.求和#includesstdio.h>

7、argrade;printf("请输入一个分数:");scanf(“%d”,得分);分数=>90?答:(得分=60?)B:“c”);//printf(“%d属于%c”,评分等级);}12。求1~10的累加和#包括无效main(){整数和;总和=0;对于(i=1;i<10;i++){求和;}printf(“1~10的和和是:%d”,总和);}13。#包括国际main(){a,b,c,d;对于(a=1;a<10;++)对于(b=0;b<10;B+)为(C=0;C<10;C

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。