欢迎来到天天文库
浏览记录
ID:12831176
大小:479.54 KB
页数:82页
时间:2018-07-19
《北理工考研计算机复试上机题详尽处理00-1》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、北京理工大学计算机专业研究生复试上机试题(2000-2010) 计算机专业研究生复试上机试题2000年:1、输入任意4个字符(如:abcd),并按反序输出(如:dcba)#include#includeusingnamespacestd;voidmain(){strings;cin>>s;for(inti=3;i>=0;i--)cout<2、有a、b、c的值。#includeusingnamespacestd;voidmain(){inta,b,c;//ints;for(inti=100;i<1000;i++){a=i/100;b=i/10-a*10;c=i%10;//cout<3、为“完数”;若因子之和大于该数,则称其为“盈数”。求出2到60之间所有“完数”和“盈数”,并以如下形式输出:E:e1e2e3......(ei为完数)G:g1g2g3......(gi为盈数)#includeusingnamespacestd;voidmain(){cout<<"E:";for(inti=2;i<=60;i++){ints=0;for(intj=1;j4、cout<<"G:";for(intk=2;k<=60;k++){ints=0;for(intj=1;jk){cout<#include#includeusingnamespacestd;struc5、tstudent{stringname;intage;intscore;};voidmain(){studentst[4];students;studentt;inti=0;ofstreamout("sf1.txt");cout<<"请输入4个学生的姓名,年龄,成绩:"<>s.name>>s.age>>s.score;out<6、me"<<"age"<<"score"<>st[i].name>>st[i].age>>st[i].score;cout<7、#includeusingnamespacestd;typedefstructstudent{charname[10];intage;intgrade;}*Stu;voidsort(Stu&students,intnum){for(inti=1;i8、students[i];intj;for(j=i-1;j>=0&&students[j].grade>=temp.grade;j--){students[j+1]=students[j];}students[j+1]=temp;}}intmain(){Stustudents=(Stu)malloc(sizeof(student)*4);stud
2、有a、b、c的值。#includeusingnamespacestd;voidmain(){inta,b,c;//ints;for(inti=100;i<1000;i++){a=i/100;b=i/10-a*10;c=i%10;//cout<3、为“完数”;若因子之和大于该数,则称其为“盈数”。求出2到60之间所有“完数”和“盈数”,并以如下形式输出:E:e1e2e3......(ei为完数)G:g1g2g3......(gi为盈数)#includeusingnamespacestd;voidmain(){cout<<"E:";for(inti=2;i<=60;i++){ints=0;for(intj=1;j4、cout<<"G:";for(intk=2;k<=60;k++){ints=0;for(intj=1;jk){cout<#include#includeusingnamespacestd;struc5、tstudent{stringname;intage;intscore;};voidmain(){studentst[4];students;studentt;inti=0;ofstreamout("sf1.txt");cout<<"请输入4个学生的姓名,年龄,成绩:"<>s.name>>s.age>>s.score;out<6、me"<<"age"<<"score"<>st[i].name>>st[i].age>>st[i].score;cout<7、#includeusingnamespacestd;typedefstructstudent{charname[10];intage;intgrade;}*Stu;voidsort(Stu&students,intnum){for(inti=1;i8、students[i];intj;for(j=i-1;j>=0&&students[j].grade>=temp.grade;j--){students[j+1]=students[j];}students[j+1]=temp;}}intmain(){Stustudents=(Stu)malloc(sizeof(student)*4);stud
3、为“完数”;若因子之和大于该数,则称其为“盈数”。求出2到60之间所有“完数”和“盈数”,并以如下形式输出:E:e1e2e3......(ei为完数)G:g1g2g3......(gi为盈数)#includeusingnamespacestd;voidmain(){cout<<"E:";for(inti=2;i<=60;i++){ints=0;for(intj=1;j4、cout<<"G:";for(intk=2;k<=60;k++){ints=0;for(intj=1;jk){cout<#include#includeusingnamespacestd;struc5、tstudent{stringname;intage;intscore;};voidmain(){studentst[4];students;studentt;inti=0;ofstreamout("sf1.txt");cout<<"请输入4个学生的姓名,年龄,成绩:"<>s.name>>s.age>>s.score;out<6、me"<<"age"<<"score"<>st[i].name>>st[i].age>>st[i].score;cout<7、#includeusingnamespacestd;typedefstructstudent{charname[10];intage;intgrade;}*Stu;voidsort(Stu&students,intnum){for(inti=1;i8、students[i];intj;for(j=i-1;j>=0&&students[j].grade>=temp.grade;j--){students[j+1]=students[j];}students[j+1]=temp;}}intmain(){Stustudents=(Stu)malloc(sizeof(student)*4);stud
4、cout<<"G:";for(intk=2;k<=60;k++){ints=0;for(intj=1;jk){cout<#include#includeusingnamespacestd;struc
5、tstudent{stringname;intage;intscore;};voidmain(){studentst[4];students;studentt;inti=0;ofstreamout("sf1.txt");cout<<"请输入4个学生的姓名,年龄,成绩:"<>s.name>>s.age>>s.score;out<6、me"<<"age"<<"score"<>st[i].name>>st[i].age>>st[i].score;cout<7、#includeusingnamespacestd;typedefstructstudent{charname[10];intage;intgrade;}*Stu;voidsort(Stu&students,intnum){for(inti=1;i8、students[i];intj;for(j=i-1;j>=0&&students[j].grade>=temp.grade;j--){students[j+1]=students[j];}students[j+1]=temp;}}intmain(){Stustudents=(Stu)malloc(sizeof(student)*4);stud
6、me"<<"age"<<"score"<>st[i].name>>st[i].age>>st[i].score;cout<7、#includeusingnamespacestd;typedefstructstudent{charname[10];intage;intgrade;}*Stu;voidsort(Stu&students,intnum){for(inti=1;i8、students[i];intj;for(j=i-1;j>=0&&students[j].grade>=temp.grade;j--){students[j+1]=students[j];}students[j+1]=temp;}}intmain(){Stustudents=(Stu)malloc(sizeof(student)*4);stud
7、#includeusingnamespacestd;typedefstructstudent{charname[10];intage;intgrade;}*Stu;voidsort(Stu&students,intnum){for(inti=1;i8、students[i];intj;for(j=i-1;j>=0&&students[j].grade>=temp.grade;j--){students[j+1]=students[j];}students[j+1]=temp;}}intmain(){Stustudents=(Stu)malloc(sizeof(student)*4);stud
8、students[i];intj;for(j=i-1;j>=0&&students[j].grade>=temp.grade;j--){students[j+1]=students[j];}students[j+1]=temp;}}intmain(){Stustudents=(Stu)malloc(sizeof(student)*4);stud
此文档下载收益归作者所有