CVTE笔试题_答案.docVIP

  • 43
  • 0
  • 约1.8千字
  • 约 12页
  • 2016-08-10 发布于重庆
  • 举报
CVTE笔试题_答案

第一个选A 第二个选C 4题选D 8题?是15 11、D 12,C 20题??我算的是82 24题可能是A 25题 生物题 我蒙个B 26题D。 28?c 29题选C 35、2 40 选D 46题水的这个??可能选A 47?c 编程题 考虑修改下面程序 #includeiostream using namespace std; typedef struct LNode { int data; struct LNode *link; }LNode,*LinkList; //n为总人数,k为第一个开始报数的人,m为出列者喊到的数 void JOSEPHUS(int n,int k,int m) { //p为当前节点,r为辅助节点,指向p的前驱节点,list为头节点 LinkList p,r,list,curr; //简历循环链表 p=(LinkList)malloc(sizeof(LNode)); p-data=1; p-link=p; curr=p; for(int i=2;i=n;i++) { LinkList t=(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(int s=m-1;s--;r=p,p=p-link); r-link=p-link; printf(%d-,p-data); free(p); p=r-link; } } #include?stdio.h #includestdlib.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 #includeiostream using namespace std; int main() { int m=1; long n,i; n=91553; cout\tn=; for(i=2;i=n;i++) while(n!=i) { if(n%i==0){couti*; n=n/i;} else break; } coutnendl; return 0; } 答案为rlnp #include iostream using namespace std; int main() { char ch[7]={1,2,3,4,5,6,7}; char temp[7]; char tmp; for(int i=0;i7;i++) { temp[i]=ch[i]*2+10115 ? (ch[i]*2+10)/3 : ch[i]*2+10; } for(int i=0;i3;i++) for(int j=6;j3;j--) { tmp=temp[i]; temp[i]=temp[j]; temp[j]=tmp; } for(int i=0;i7;i++) couttemp[i]; coutendl; return 0; } 5,12,23, -1 答案为倒过来写

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档