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

加入VIP,免费下载
 

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

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

下载须知

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

版权提示 | 免责声明

本文(最新福建省计算机等级考试二级C语言考试题库.docx)为本站会员(b****1)主动上传,冰点文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰点文库(发送邮件至service@bingdoc.com或直接QQ联系客服),我们立即给予删除!

最新福建省计算机等级考试二级C语言考试题库.docx

1、最新福建省计算机等级考试二级C语言考试题库最新福建省计算机等级考试二级C语言考试题库改错题 #include #include void main() char s1100, s2100; int i,s_len; printf(Please input string: n); gets(s1); s_len = /*/ s1 /*/; for(i=0; i= 0 & s1i = 7) s2i = s1i + 2; else if(s1i = 8/*/ & /*/s1i=9) s2i = s1i-8; else s2i = s1i; /*/ s2i+1 /*/ = 0; puts(s2); g

2、etch(); #include #include int prime( int x ) int i, mark=1 ; double k; /*/ i=1 /*/; k=(int)sqrt(double)x); while (i=k) if(x%i=0) /*/ i=k+1; /*/ break; i+; return (mark); void main() int a; printf(Input a number: ); scanf(%d,&a); if(/*/ !prime(a) /*/) printf(%d is a prime number.n, a); else printf(It

3、s not.n); getch(); #include float fun(float a) return (a*a+2*a+1)/(a-1); void main() float x,y,z; float result; printf(nPlease input x,y,z: ); scanf(/*/ %d%d%d /*/,&x,&y,&z); if(x=1 | y=1 | z=1) printf(Divide 0,error!); getch(); return ; result=/*/ fun(x,y,z) /*/; printf(nResult=%.2fn,result); getch

4、(); #include void chg(char s) int i; /*/ i=1 /*/; while(si!=0) if (si=A & si=Z) & /*/ i%2 /*/) /*/ si=si-32; /*/ i+; void main() char str_s100; printf(Enter string: ); gets(str_s); chg(str_s); printf(nNow string is:); puts(str_s); getch(); #include int fun(/*/ char p /*/) int x; /*/ x=1; /*/ while(*

5、p) x=x*8+*p-0; p+; return(/*/ *p /*/); void main() char str_s6; printf(Enter string: ); gets(str_s); printf(nDecimal is: %d,fun(str_s) ); getch(); #include void main() char str100; char *p; p=str; scanf(%s,str); while ( /*/*p=0 /*/) p+; printf(/*/The length is: %s /*/,p-str); getch(); #include void

6、main() int i,gw,sw,sum=0; for(i=1;i100;i+) sw=i/10; gw= /*/ i-sw /*/; if(gw=3 | gw=5)|(sw=3 | sw=5) /*/ sum=i /*/; printf(nThe sum is:%d,sum); getch(); #include #include void fun(/*/ float a, b, c /*/) double s,area; if(a+bc & a+cb & b+ca) /*/ s=a+b+c/2; /*/ area=/*/ sqt(s*(s-a)*(s-b)*(s-c) /*/ ; pr

7、intf(area=%7.2fn,area); else printf(Not a triangle.n); void main() float a,b,c; printf(Input a,b,c:); scanf(%f,%f,%f,&a,&b,&c); fun(a,b,c); getch(); #include void main() int i,num100,count; /*/ count=1 /*/; for(i=1000; i=2000; i+) if(/*/ (i-2)%4 = 0 & (i-3)%7=0 /*/) numcount=i; count+; printf(Total

8、number is:%dn, count ); for(i=0; /*/i=count /*/;i+) printf(%dn, numi); getch(); #include void swap(int *p, /*/ *q /*/) int temp; /*/ *temp /*/= *p; /*/ *q = *p; /*/ *q = temp; void main() int a,b; printf(Input 2 numbers:n); scanf(%d%d,&a,&b); printf(nOriginal: a=%d b=%dn,a,b); swap(&a,&b); printf(No

9、w: a=%d b=%dn,a,b); getch(); 填空题 /*/ /*/ void main() char str100; int /*/ /*/; printf(Input string :); gets(str); for(i=j=0; stri!=0; i+) if(stri!=b) strj=stri; /*/ /*/; strj=0; printf(Now string is:); puts(str); getch(); #include void main() struct student char name10; float score; ; struct student

10、 stu5=Mary,76.1,John,87.3,Tom,81,susa,87.8,wilu,79; int i=0,k=0; /*/ /*/ ; for(i=0;imax) max=/*/ /*/ ; /*/ /*/; printf(nname:%s,score:%.2f, stuk.name,stuk.score ); getch(); #include #include void main() int i,j ; int a55,sum; /*/ /*/; printf(Please input 25 numbers:n); for(i=0; i5;i+) for(j=0;j5;j+)

11、 scanf(%d,&aij); if(/*/ /*/) sum+=aij; printf(%.5fn,/*/ /*/); getch(); #include void main() int i,j,k; int num=0; printf( No. 1 yuan 2 yuan 5 yuann); for(k=0;k=2;k+) for(j=0;j=5;j+) for(i=0;/*/ /*/;i+) if(/*/ /*/) num+; printf(%9d%9d%9d%9dn,num,i,j,k); getch(); #include /*/ /*/ N 10 int find(int a,i

12、nt x) int i; for(/*/ /*/;i=0) printf(%d is found,its at %dn,f,f_at); else printf(Not exist.n); getch(); #include void main() int m,n,k; for ( m = 1; m 10 ; m+) for ( n = 1 ;/*/ /*/; n+) k =/*/ /*/; if (k = 99) printf ( M = %d N = %dn, m, n ); getch(); #include #define N 10 void main() int aN=21,56,-

13、9,0,3,17,18,5,-23,11; int i,j,/*/ /*/; for(i=N-1;i=1;i-) for(j=0;j=/*/ /*/ ;j+) if(/*/ /*/) temp=aj; aj=aj+1; aj+1=temp; printf(Sorted numbers:n); for(i=0;iN;i+) printf(%4d ,ai); printf(n); getch(); #include void main() int x,na,nb,nc; na=nb=/*/ /*/; printf(Please input integer number, end with 0:n)

14、; scanf(%d,&x); while( x ) if(x0) /*/ /*/; else +nb; if( abs(x%/*/ /*/)=3 ) +nc; printf(Please input integer number, end with 0:n); scanf(%d,&x); printf(na=%d nb=%d nc=%dn,na,nb,nc); getch(); #include void main() enum bodyzhang,wang,zhao,li; /*/ /*/ body day12, j; int i; j=zhang; for(i=0;ili) j=/*/

15、/*/; printf(List :n); for(i=1;i=12;i+) switch(dayi-1) case zhang: printf(Day %2d is %s n,i,zhang);break; case wang: printf(Day %2d is %s n,i,wang);break; case /*/ /*/: printf(Day %2d is %s n,i,zhao);break; case li: printf(Day %2d is %s n,i,li); getch(); #include void main() int i,s9; float aver; pri

16、ntf(Please input sampler:n); for(i=0;i9;i+) scanf(%d,&si); aver=(float)/*/ /*/)/2; for(i=0;i9;i+) if(si/*/ /*/) printf(%dn,si); getch(); 编程题 #include #include double fun(double x) /*/ /*/ void main() double x; printf(Pleae input x:); scanf(%lf,&x); printf(nfun(%6.3lf) = %6.3lfn,x,fun(x); getch(); #i

17、nclude #include float fun(float f, char s) /*/ /*/ void main() float x,y; char str16; printf(Input the fahrenheit temperature: ); scanf(%f,&x); y=fun(x,str); printf(the celsius temperature: %f, %sn,y,str); getch(); #include #include double fun(double x) /*/ /*/ void main() double x; printf(Pleae inp

18、ut x:); scanf(%lf,&x); printf(nfun(%6.3lf) = %6.3lfn,x,fun(x); getch(); #include int fun(long a) /*/ /*/ void main() int i,n; long a20; n=fun(a); for(i=0;in;i+) printf(%ld ,ai); printf(n); printf(n=%dn,n); getch(); #include #include double fun(float x) /*/ /*/ void main() float x; double y; printf(P

19、lease input a number: ); scanf(%f,&x); printf(f(%.2f)=%.2fn,x,fun(x); getch(); #include long fun(int n) /*/ /*/ void main() int n; printf(Input n(n=1): ); scanf(%d,&n); printf(fun(%d) =%ld n ,n,fun(n); getch(); #include #define RW 3 #define CL 5 void fun(int aCL,int n) /*/ /*/ void main() int arraRW

20、CL = 1,2,3,4,5,11,12,13,14,15,21,22,23,24,25; int i,j,k; printf(Original array is:n); for(i=0; iRW; i+) for(j=0;jCL;j+) printf(%6d, arraij); printf(n); printf(nInput sites of moving: ); scanf(%d,&k); fun(arra,k); printf(nNow array is:n); for(i=0; iRW; i+) for(j=0;jCL;j+) printf(%6d, arraij); printf(

21、n); getch(); #include #include double fun(int n) /*/ /*/ void main() int n; printf(Input n(n=0): ); scanf(%d,&n); printf(pi=%lfn ,fun(n); getch(); #include #include double fun(float x) /*/ /*/ void main() float x; double y; printf(Please input a number: ); scanf(%f,&x); printf(f(%.2f)=%.2fn,x,fun(x); getch(); #include #include double fun(double x) /*/ /*/ void main() double x; printf(Pleae input x:); scanf(%lf,&x); printf(nfun(%6.3lf) = %6.3lfn,x,fun(x); getch();

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2