CVTE笔试题答案Word文档格式.docx

上传人:b****6 文档编号:19989898 上传时间:2023-01-13 格式:DOCX 页数:13 大小:921.33KB
下载 相关 举报
CVTE笔试题答案Word文档格式.docx_第1页
第1页 / 共13页
CVTE笔试题答案Word文档格式.docx_第2页
第2页 / 共13页
CVTE笔试题答案Word文档格式.docx_第3页
第3页 / 共13页
CVTE笔试题答案Word文档格式.docx_第4页
第4页 / 共13页
CVTE笔试题答案Word文档格式.docx_第5页
第5页 / 共13页
点击查看更多>>
下载资源
资源描述

CVTE笔试题答案Word文档格式.docx

《CVTE笔试题答案Word文档格式.docx》由会员分享,可在线阅读,更多相关《CVTE笔试题答案Word文档格式.docx(13页珍藏版)》请在冰豆网上搜索。

CVTE笔试题答案Word文档格式.docx

28 

c

29题选C

35、2

40选D

46题水的这个 

可能选A

47 

编程题

考虑修改下面程序

#include<

iostream>

usingnamespacestd;

typedefstructLNode

{

intdata;

structLNode*link;

}LNode,*LinkList;

//n为总人数,k为第一个开始报数的人,m为出列者喊到的数

voidJOSEPHUS(intn,intk,intm)

//p为当前节点,r为辅助节点,指向p的前驱节点,list为头节点

LinkListp,r,list,curr;

//简历循环链表

p=(LinkList)malloc(sizeof(LNode));

p->

data=1;

p->

link=p;

curr=p;

for(inti=2;

i<

=n;

i++),

{

LinkListt=(LinkList)malloc(sizeof(LNode));

t->

data=i;

link=curr->

link;

curr->

link=t;

curr=t;

}

//把当前指针移动到第一个报数的人

r=curr;

while(k--)

r=p,p=p->

while(n--)

for(ints=m-1;

s--;

r=p,p=p->

link);

r->

link=p->

printf("

%d->

"

p->

data);

free(p);

p=r->

}

#include 

<

stdio.h>

stdlib.h>

int 

fun(int 

n)

if(n<

=2)

return 

1;

else 

fun(n-1)+2*fun(n-2) 

;

void 

main(void)

a=fun(19)+fun(13);

printf("

%d\n"

a);

177494

intmain()

intm=1;

longn,i;

n=91553;

cout<

'

\t'

n<

="

for(i=2;

i++)

while(n!

=i)

{if(n%i==0){cout<

*"

n=n/i;

elsebreak;

endl;

return0;

答案为&

rlnp

#include<

charch[7]={'

1'

'

2'

3'

4'

5'

6'

7'

};

chartemp[7];

chartmp;

for(inti=0;

7;

temp[i]=ch[i]*2+10>

115?

(ch[i]*2+10)/3:

ch[i]*2+10;

3;

for(intj=6;

j>

j--)

{

tmp=temp[i];

temp[i]=temp[j];

temp[j]=tmp;

}

cout<

temp[i];

5,12,23,

-1

答案为倒过来写

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

当前位置:首页 > 总结汇报

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

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