CVTE笔试题标准答案Word格式.docx
- 文档编号:14104500
- 上传时间:2022-10-18
- 格式:DOCX
- 页数:13
- 大小:922.49KB
CVTE笔试题标准答案Word格式.docx
《CVTE笔试题标准答案Word格式.docx》由会员分享,可在线阅读,更多相关《CVTE笔试题标准答案Word格式.docx(13页珍藏版)》请在冰豆网上搜索。
29题选C
35、2
40选D
46题水的这个
可能选A
47
ﻬ
编程题
考虑修改下面程序
#include<
iostream>
usingnamespacestd;
typedefstructLNode
{
intdata;
structLNode*link;
}LNode,*LinkList;
//n为总人数,k为第一个开始报数的人,m为出列者喊到的数
voidJOSEPHUS(intn,intk,int m)
//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;
t->
link=curr->link;
curr->
link=t;
curr=t;
}
//把当前指针移动到第一个报数的人
r=curr;
while(k--)
r=p,p=p->link;
while(n--)
for(ints=m-1;
s--;
r=p,p=p->
link);
r->
link=p->
link;
printf("
%d->
"
p->data);
free(p);
p=r->
link;
}
#include
<
stdio.h>
#include<stdlib.h>
ﻫ
int
fun(int
n)
{ﻫif(n<
=2)ﻫreturn
1;
else
ﻫreturn
fun(n-1)+2*fun(n-2)
;
ﻫ}ﻫvoid
main(void)
{ﻫint
a=fun(19)+fun(13);
ﻫprintf("
%d\n"
,a);
}ﻫﻫﻫ177494
#include<
iostream>
usingnamespace std;
intmain()
{
intm=1;
long n,i;
n=91553;
cout<<'
\t'
<n<
="
;
for(i=2;
=n;
i++)
while(n!
=i)
{if(n%i==0){cout<
*";
n=n/i;
else break;
}
cout<
n<
<endl;
return0;
答案为&
'
<rlnp
#include <iostream>
usingnamespace std;
intmain()
ﻩchar ch[7]={'
1'
'
2'
3'
'4'
'5'
'6'
7'
};
chartemp[7];
ﻩchartmp;
for(int i=0;
i<7;
i++)
ﻩ{
temp[i]=ch[i]*2+10>115?
(ch[i]*2+10)/3:
ch[i]*2+10;
ﻩ}
for(int i=0;
3;
for(intj=6;
j>
3;
j--)
ﻩ{
ﻩtmp=temp[i];
ﻩﻩtemp[i]=temp[j];
temp[j]=tmp;
}
for(inti=0;
7;
ﻩcout<
temp[i];
ﻩcout<
endl;
return0;
5,12,23,
-1
答案为倒过来写
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- CVTE 笔试 标准答案