C语音模拟题1.docx

上传人:b****5 文档编号:7606139 上传时间:2023-01-25 格式:DOCX 页数:25 大小:1.08MB
下载 相关 举报
C语音模拟题1.docx_第1页
第1页 / 共25页
C语音模拟题1.docx_第2页
第2页 / 共25页
C语音模拟题1.docx_第3页
第3页 / 共25页
C语音模拟题1.docx_第4页
第4页 / 共25页
C语音模拟题1.docx_第5页
第5页 / 共25页
点击查看更多>>
下载资源
资源描述

C语音模拟题1.docx

《C语音模拟题1.docx》由会员分享,可在线阅读,更多相关《C语音模拟题1.docx(25页珍藏版)》请在冰豆网上搜索。

C语音模拟题1.docx

C语音模拟题1

A

C

D

A

A

A

A

B

D

D

B

B

B

D

D

A

D

B

D

A

A

D

B

B

C

A

B

A

A

D

B

D

C

B

B

C

D

A

C

#include

#include

main()

{chars[80],t[80];

inti,sl;

printf("\nPleaseenterstrings:

");

scanf("%s",s);

sl=strlen(s);

/************found************/

for(i=0;i<=sl;i+=2)//改为:

for(i=0;i<=sl;i++)

t[i]=s[i];

for(i=0;i

t[sl+i]=s[sl-i-1];

/************found************/

t[sl]='\0';//改为:

t[sl+sl]='\0';

printf("Theresultis:

%s\n",t);

}

#include

main()

{intM,t,i,M1,n=0;

printf("Pleaseenteranumber:

");

scanf("%d",&M);

/************found************/

for(____

(1)____;t++)填入:

t=1;t<=M;

{

M1=t/2;

for(i=2;i

if(M1%i==0)break;

/************found************/

if(i==M1_____

(2)_______)填入:

&&t%2==0

{printf("%d=%d+%d",t,M1,M1);n++;}

if(n%5==0)printf("\n");

}

#include

voidNONO(void);

intfact(inti)

{

intp,j;

/***********begin***********/

p=1;

for(j=1;j

p=p*j;

/***********end************/

returnp;

}

main()

{

intm,n,s;

/***********begin***********/

m=10;

n=4;

s=fact(m)/(fact(n)*fact(m-n));

/***********end************/

printf("s=%d\n",s);

NONO();

}

voidNONO(void)

{

FILE*wf;

ints;

wf=fopen("out1.dat","w");

s=fact(10)/(fact(4)*fact(6));

fprintf(wf,"s=%d\n",s);

fclose(wf);

}

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > PPT模板 > 商务科技

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

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