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

上传人:b****3 文档编号:7104016 上传时间:2023-05-07 格式:DOCX 页数:13 大小:921.25KB
下载 相关 举报
CVTE笔试题答案文档格式.docx_第1页
第1页 / 共13页
CVTE笔试题答案文档格式.docx_第2页
第2页 / 共13页
CVTE笔试题答案文档格式.docx_第3页
第3页 / 共13页
CVTE笔试题答案文档格式.docx_第4页
第4页 / 共13页
CVTE笔试题答案文档格式.docx_第5页
第5页 / 共13页
CVTE笔试题答案文档格式.docx_第6页
第6页 / 共13页
CVTE笔试题答案文档格式.docx_第7页
第7页 / 共13页
CVTE笔试题答案文档格式.docx_第8页
第8页 / 共13页
CVTE笔试题答案文档格式.docx_第9页
第9页 / 共13页
CVTE笔试题答案文档格式.docx_第10页
第10页 / 共13页
CVTE笔试题答案文档格式.docx_第11页
第11页 / 共13页
CVTE笔试题答案文档格式.docx_第12页
第12页 / 共13页
CVTE笔试题答案文档格式.docx_第13页
第13页 / 共13页
亲,该文档总共13页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

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

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

CVTE笔试题答案文档格式.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;

link=p;

curr=p;

for(inti=2;

i<

=n;

i++),

{

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

t->

data=i;

t->

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-2023 冰点文库 网站版权所有

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