修练者
#include<iostream>
#include<bits/stdc++.h>
#include<windows.h>
#include<stdio.h>
#include <conio.h>
using namespace std;
string h1,h2,h3,h4,h5,h6;
int a[10000],b,c,d,e,f,g,cnt,sum,jc;
string baba;
int mama;
string u1,u2,u3,u4,u5;
string bu,s1,s2,s3,s3b,s4,s5,s6,s7,s8,s9,s21,s22,s32,s51,z1="#include<iostream>",z2="using",z21="namespace",z22="std;",z3="int",z32="main()",zb="{",z4="cout<<'helloworld';",z5="return",z51="0;",z6="}";
bool b1,b2,b3,b31,b4,b5,b6,b7,b21,b22,b32,b51;
int ua;
int main()
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|
FOREGROUND_GREEN|FOREGROUND_BLUE);
cout<<"C++习题练习软件v1.0版";
cout<<endl<<endl;
Sleep(2000);
cout<<"作者";
Sleep(2000);
cout<<endl<<endl<<"汪";
Sleep(2000);
cout<<endl<<" "<<" "<<" "<<" "<<"汪"<<endl<<"哥";
Sleep(2000);
cout<<endl<<" "<<" "<<" "<<" "<<"一"<<endl<<"伟";
Sleep(2000);
cout<<endl<<" "<<" "<<" "<<" "<<"尘"<<endl<<"大";
Sleep(4000);
system("cls");
cout<<"请输入汪哥工作号:";
cin>>baba;
system("cls");
cout<<"正在识别中";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
system("cls");
cout<<"!!!!!!";
Sleep(1000);
cout<<"识别成功,正在进入中";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
system("cls");
while(1){
system("cls");
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|
FOREGROUND_GREEN);
cout<<"请输入任意数字";
Sleep(2000);
cout<<endl<<"初级手(1)''''中极手(2)''''高级手(3)''''不清楚(4)(正在建设)''''退出(任意数,除1,2,3,4)";
cin>>b;
if(b==1){
while(1){
system("cls");
cout<<"正在进入初级训练营中";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
system("cls");
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|
FOREGROUND_GREEN|FOREGROUND_BLUE);
cout<<"初级1题";
cout<<endl<<"对于大部分编程语言来说,编写一个能够输出“helloworld”的程序往往是最基本、最简单的。";
cout<<"因此,这个程序常常作为一个初学者接触一门新的编程语言所写的第一个程序,也经常用来测试开发、编译环境是否能够正常工作。" ;
cout<<"现在你就需要完成这样一个程序";
cout<<endl<<endl;
cout<<"输入描述";
cout<<endl<<"无";
cout<<endl<<endl<<"输出描述";
cout<<endl<<"一行,仅包含一个字符串:“helloworld”";
cout<<endl<<endl<<"样例输出";
cout<<endl<<"helloworld";
cout<<endl<<"严重注意:写代码时双引号用''代替,并且大括号(左)和大括号(右)要另起一行";
cout<<endl<<endl<<"看题时间:50秒";
Sleep(10000);
cout<<endl<<"还有40秒 ";
Sleep(20000);
cout<<"还有20秒 ";
Sleep(10000);
cout<<"还有10秒 ";
Sleep(5000);
cout<<"还有5秒";
Sleep(5000);
cout<<endl<<"时间结束";
Sleep(1000);
system("cls");
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|
FOREGROUND_GREEN|FOREGROUND_BLUE);
cout<<"请连续输入此代码,有明确标准的第几行请不要错乱,否则算错!"<<endl;
cout<<"1、";
cin>>s1;
b1=(s1==z1);
system("cls");
cout<<"1、"<<s1<<endl<<"2、";
cin>>s2>>s21>>s22;
b2=(s2==z2);
b21=(s21==z21);
b22=(s22==z22);
system("cls");
cout<<"1、"<<s1<<endl<<"2、"<<s2<<" "<<s21<<" "<<s22<<endl<<"3、";
cin>>s3>>s32;
b3=(s3==z3);
b32=(s32==z32);
system("cls");
cout<<"1、"<<s1<<endl<<"2、"<<s2<<" "<<s21<<" "<<s22<<endl<<"3、"<<s3<<" "<<s32<<endl<<"4、";
cin>>s3b;
b31=(s3b==zb);
system("cls");
cout<<"1、"<<s1<<endl<<"2、"<<s2<<" "<<s21<<" "<<s22<<endl<<"3、"<<s3<<" "<<s32<<endl<<"4、"<<s3b<<endl<<"5、";
cin>>s4;
b4=(s4==z4);
system("cls");
cout<<"1、"<<s1<<endl<<"2、"<<s2<<" "<<s21<<" "<<s22<<endl<<"3、"<<s3<<" "<<s32<<endl<<"4、"<<s3b<<endl<<"5、"<<s4<<endl<<"6、";
cin>>s5>>s51;
b5=(s5==z5);
b51=(s51==z51);
system("cls");
cout<<"1、"<<s1<<endl<<"2、"<<s2<<" "<<s21<<" "<<s22<<endl<<"3、"<<s3<<" "<<s32<<endl<<"4、"<<s3b<<endl<<"5、"<<s4<<endl<<"6、"<<s5<<" "<<s51<<endl<<"7、";
cin>>s6;
b6=(s6==z6);
system("cls");
cout<<"1、"<<s1<<endl<<"2、"<<s2<<" "<<s21<<" "<<s22<<endl<<"3、"<<s3<<" "<<s32<<endl<<"4、"<<s3b<<endl<<"5、"<<s4<<endl<<"6、"<<s5<<" "<<s51<<endl<<"7、"<<z6;
cout<<endl<<endl<<"你的代码如上";
Sleep(3000);
system("cls");
cout<<"结果生成中,请耐心等待";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
system("cls");
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_BLUE);
cout<<"恭喜您,满分70分,您得了"<<b1*10+ b2*3+b21*4+ b22*3 +b3*5 +b32*5 +b31*10 +b4*10 +b5*5 +b51*5 +b6*10<<"分";
Sleep(5000);
system("cls");
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|
FOREGROUND_GREEN|FOREGROUND_BLUE);
cout<<"解析生成中";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
system("cls");
if(b1==1){
cout<<"第一步:正确"<<endl<<"你的代码:"<<s1<<endl<<"正确代码:"<<z1<<endl<<endl;
}
else{
cout<<"第一步:错误"<<endl<<"你的代码:"<<s1<<endl<<"正确代码:"<<z1<<endl<<endl;
}
if(b2+b21+b22==3){
cout<<"第二步:正确"<<endl<<"你的代码:"<<s2<<" "<<s21<<" "<<s22<<endl<<"正确代码:"<<z2<<" "<<z21<<" "<<z22<<endl<<endl;
}
else{
cout<<"第二步:错误"<<endl<<"你的代码:"<<s2<<" "<<s21<<" "<<s22<<endl<<"正确代码:"<<z2<<" "<<z21<<" "<<z22<<endl<<endl;
}
if(b3+b31==2){
cout<<"第三步:正确"<<endl<<"你的代码:"<<s3<<" "<<b32<<endl<<"正确代码:"<<z3<<" "<<z32<<endl<<endl;
}
else{
cout<<"第三步:错误"<<endl<<"你的代码:"<<s3<<" "<<b32<<endl<<"正确代码:"<<z3<<" "<<z32<<endl<<endl;
}
if(b31==1){
cout<<"第四步:正确"<<endl<<"你的代码:"<<s3b<<endl<<"正确代码:"<<zb<<endl<<endl;
}
else{
cout<<"第四步:错误"<<endl<<"你的代码:"<<s3b<<endl<<"正确代码:"<<zb<<endl<<endl;
}
if(b4==1){
cout<<"第五步:正确"<<endl<<"你的代码:"<<s4<<endl<<"正确代码:"<<z4<<endl<<endl;
}
else{
cout<<"第五步:错误"<<endl<<"你的代码:"<<s4<<endl<<"正确代码:"<<z4<<endl<<endl;
}
if(b5+b51==2){
cout<<"第六步:正确"<<endl<<"你的代码:"<<s5<<" "<<s51<<endl<<"正确代码:"<<z5<<" "<<z51<<endl<<endl;
}
else{
cout<<"第六步:错误"<<endl<<"你的代码:"<<s5<<" "<<s51<<endl<<"正确代码:"<<z5<<" "<<z51<<endl<<endl;
}
if(b6==1){
cout<<"第七步:正确"<<endl<<"你的代码:"<<s6<<endl<<"正确代码:"<<z6;
}
else{
cout<<"第七步:错误"<<endl<<"你的代码:"<<s6<<endl<<"正确代码:"<<z6;
}
cout<<endl<<endl<<"具体正错如上,限时30秒";
Sleep(30000);
system("cls");
cout<<"正在加载中,请耐心等待";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
system("cls");
cout<<"您是否要继续答题(1为答题,2为退出初级区,其它数为关机)";
cin>>ua;
if(ua==1){
cout<<"暂未开通";
Sleep(4000);
system("cls");
cout<<endl<<"关机中";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
}
if(ua==2){
break;
}
if(ua!=1&&ua!=2){
cout<<"退出启动";
Sleep(2999);
return 0;
}
}
}
if(b==2){
int gu;
string a1,a2,a21,a22,a3,a31,a4,a5,a51,a6,a7,a8,a9,a91,a10,q1="#include<iostream>",q2="using",q21="namespace",q22="std;",q3="int",q31="main()",q4="{",q5="for(int",q51="i=1;i<=10;i++)",q6="{",q7="cout<<'疫情防控,从我做起';",q8="}",q9="return",q91="0;",q10="}";
bool o1,o2,o21,o22,o3,o31,o4,o5,o51,o6,o7,o8,o9,o91,o10;
while(1){
system("cls");
cout<<"正在进入中级训练营中";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
system("cls");
cout<<"中级1题";
cout<<endl<<"小强现在想看到十个“疫情防控,从我做起”,请你帮他一下";
cout<<endl<<endl;
cout<<"输入描述";
cout<<endl<<"无";
cout<<endl<<endl<<"输出描述";
cout<<endl<<"一行,包含十个字符串‘疫情防控,从我做起’";
cout<<endl<<endl<<"样例输出";
cout<<endl<<"无";
cout<<endl<<"严重注意:写代码时双引号用''代替,并且大括号(左)和大括号(右)要另起一行";
cout<<endl<<endl<<"看题时间:30秒"<<endl;
Sleep(10000);
cout<<"还剩20秒";
Sleep(10000);
cout<<" "<<"还剩10秒";
Sleep(10000);
cout<<" "<<"时间结束";
system("cls");
cout<<"请连续输入此代码,有明确标准的第几行请不要错乱,否则算错!"<<endl<<"1、";
cin>>a1;
o1=(a1==q1);
system("cls");
cout<<"1、"<<a1<<endl<<"2、";
cin>>a2>>a21>>a22;
o2=(a2==q2);
o21=(a21==q21);
o22=(a22==q22);
system("cls");
cout<<"1、"<<a1<<endl<<"2、"<<a2<<" "<<a21<<" "<<a22<<endl<<"3、";
cin>>a3>>a31;
o3=(a3==q3);
o31=(a31==q31);
system("cls");
cout<<"1、"<<a1<<endl<<"2、"<<a2<<" "<<a21<<" "<<a22<<endl<<"3、"<<a3<<" "<<a31<<endl<<"4、";
cin>>a4;
o4=(a4==q4);
system("cls");
cout<<"1、"<<a1<<endl<<"2、"<<a2<<" "<<a21<<" "<<a22<<endl<<"3、"<<a3<<" "<<a31<<endl<<"4、"<<a4<<endl<<"5、";
cin>>a5>>a51;
o5=(a5==q5);
o51=(a51==q51);
system("cls");
cout<<"1、"<<a1<<endl<<"2、"<<a2<<" "<<a21<<" "<<a22<<endl<<"3、"<<a3<<" "<<a31<<endl<<"4、"<<a4<<endl<<"5、"<<a5<<" "<<a51<<endl<<"6、";
cin>>a6;
o6=(a6==q6);
system("cls");
cout<<"1、"<<a1<<endl<<"2、"<<a2<<" "<<a21<<" "<<a22<<endl<<"3、"<<a3<<" "<<a31<<endl<<"4、"<<a4<<endl<<"5、"<<a5<<" "<<a51<<endl<<"6、"<<a6<<endl<<"7、";
cin>>a7;
o7=(a7==q7);
system("cls");
cout<<"1、"<<a1<<endl<<"2、"<<a2<<" "<<a21<<" "<<a22<<endl<<"3、"<<a3<<" "<<a31<<endl<<"4、"<<a4<<endl<<"5、"<<a5<<" "<<a51<<endl<<"6、"<<a6<<endl<<"7、"<<a7<<endl<<"8、";
cin>>a8;
o8=(a8==q8);
system("cls");
cout<<"1、"<<a1<<endl<<"2、"<<a2<<" "<<a21<<" "<<a22<<endl<<"3、"<<a3<<" "<<a31<<endl<<"4、"<<a4<<endl<<"5、"<<a5<<" "<<a51<<endl<<"6、"<<a6<<endl<<"7、"<<a7<<endl<<"8、"<<a8<<endl<<"9、";
cin>>a9>>a91;
o9=(a9==q9);
o91=(a91==q91);
system("cls");
cout<<"1、"<<a1<<endl<<"2、"<<a2<<" "<<a21<<" "<<a22<<endl<<"3、"<<a3<<" "<<a31<<endl<<"4、"<<a4<<endl<<"5、"<<a5<<" "<<a51<<endl<<"6、"<<a6<<endl<<"7、"<<a7<<endl<<"8、"<<a8<<endl<<"9、"<<a9<<" "<<a91<<endl<<"10、";
cin>>a10;
o10=(a10==q10);
system("cls");
cout<<"1、"<<a1<<endl<<"2、"<<a2<<" "<<a21<<" "<<a22<<endl<<"3、"<<a3<<" "<<a31<<endl<<"4、"<<a4<<endl<<"5、"<<a5<<" "<<a51<<endl<<"6、"<<a6<<endl<<"7、"<<a7<<endl<<"8、"<<a8<<endl<<"9、"<<a9<<" "<<a91<<endl<<"10、"<<a10;
cout<<endl<<endl<<"你的代码如上";
Sleep(2000);
system("cls");
cout<<"正在识别中";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
system("cls");
cout<<"恭喜你,满分100分,您得了"<<o1*10+o2*4+o21*3+o22*3+o3*5+o31*5+o4*10+o5*5+o51*5+o6*10+o7*10+o8*10+o9*5+o91*5+o10*10<<"分";
Sleep(5000);
system("cls");
cout<<"解析生成中";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
system("cls");
cout<<"1为正确,0为错误,其中二、三、五、九的满分分数分别为3、2、2、2";
Sleep(5000);
system("cls");
cout<<"第一步 "<<o1<<endl<<"你的答案"<<a1<<endl<<"正确答案"<<q1<<endl<<endl;
cout<<"第二步 "<<o2+o21+o22<<endl<<"你的答案"<<a2<<" "<<a21<<" "<<a22<<endl<<"正确答案"<<q2<<" "<<q21<<" "<<q22<<endl<<endl;
cout<<"第三步 "<<o3+o31<<endl<<"你的答案"<<a3<<" "<<a31<<endl<<"正确答案"<<q3<<" "<<q31<<endl<<endl;
cout<<"第四步 "<<o4<<endl<<"你的答案"<<a4<<endl<<"正确答案"<<q4<<endl<<endl;
cout<<"第五步 "<<o5+o51<<endl<<"你的答案"<<a5<<" "<<a51<<endl<<"正确答案"<<q5<<" "<<q51<<endl<<endl;
cout<<"第六步 "<<o6<<endl<<"你的答案"<<a6<<endl<<"正确答案"<<q6<<endl<<endl;
cout<<"第七步 "<<o7<<endl<<"你的答案"<<a7<<endl<<"正确答案"<<q7<<endl<<endl;
cout<<"第八步 "<<o8<<endl<<"你的答案"<<a8<<endl<<"正确答案"<<q8<<endl<<endl;
cout<<"第九步 "<<o9+o91<<endl<<"你的答案"<<a9<<" "<<a91<<endl<<"正确答案"<<q9<<" "<<q91<<endl<<endl;
cout<<"第十步 "<<o10<<endl<<"你的答案"<<a10<<endl<<"正确答案"<<q10<<endl<<endl;
cout<<"观看时间30秒";
Sleep(30000);
system("cls");
cout<<"您是否要继续答题(1为答题,2为退出中级区,其它数为关机)";
cin>>gu;
if(gu==1){
cout<<"暂未开通";
Sleep(4000);
system("cls");
cout<<endl<<"关机中";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
}
if(gu==2){
break;
}
if(gu!=1&&gu!=2){
cout<<"退出启动";
Sleep(2999);
return 0;
}
}
}
if(b==3){
system("cls");
string m1,m2,m3,m4,m5,m6,m7;
char v1,v2,v3,v4,v5,v6,v7,v8;
int bw1,bw2,bw3,bw4,bw5,bw6,bnima,ss;
while(1){
cout<<"正在进入高级训练营中";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
system("cls");
cout<<"高级填空题(简类型)";
cout<<endl<<"请观看马上出现的代码,填写代码中缺失的部分";
Sleep(7000);
system("cls");
cout<<"代码生成中";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
system("cls");
cout<<"小华看到的二行字符串,想把它们的一部分给删减并裁剪,请你帮他";
cout<<endl;
cout<<endl;
cout<<"#include<iostream>";
cout<<endl<<"#include<_____1_____>//字符串该有的头文件";
cout<<endl<<"using _____2_____ std;";
cout<<endl<<"int a,b,c,d";
cout<<endl<<"string s1,s2,s3,s4";
cout<<endl<<"int main()";
cout<<endl<<"{";
cout<<endl<<"cin>>s1>>s2>>a>>b>>c>>d";
cout<<endl<<"s3=______3_____;(将s1中从a到b的地方给截取下来)";
cout<<endl<<"cout<<___4___;(输出你截取的东西)";
cout<<endl<<"s4=______5_____;(将s2中从c到d的地方给删除下来)";
cout<<endl<<"cout<<s4;";
cout<<endl<<"___6___ 0;";
cout<<endl<<"}";
cout<<endl<<endl<<"1、( )";
cout<<endl<<"A.cstdio; B.string; c.bits/stdc++.h; d.cmath"<<endl;
cout<<"答案:";
cin>>v1;
if(v1=='B'||v1=='C'){
bw1=1;
}
else{
bw1=0;
}
cout<<endl<<endl<<"2、( )";
cout<<endl<<"A.namespace; B.namespase; C.name space; D.namespacc"<<endl;
cout<<"答案:";
cin>>v2;
if(v2=='A'){
bw2=1;
}
else{
bw2=0;
}
cout<<endl<<endl<<"3、( )";
cout<<endl<<"A.s1.subbtr(a,b); B.s1.substr(a,b); C.s2.substr(a,b); D.s1.substr(c,d)"<<endl;
cout<<"答案:";
cin>>v3;
if(v3=='B'){
bw3=1;
}
else{
bw3=0;
}
cout<<endl<<endl<<"4、( )";
cout<<endl<<"A.s; B.s2; C.s1; D.sb;"<<endl;
cout<<"答案:";
cin>>v4;
if(v4=='C'){
bw4=1;
}
else{
bw4=0;
}
cout<<endl<<endl<<"5、( )";
cout<<endl<<"A.erase(c,b); B.erase(b,c); C.erase(c,a); D.erase(c,d);"<<endl;
cout<<"答案:";
cin>>v5;
if(v5=='D'){
bw5=1;
}
else{
bw5=0;
}
cout<<endl<<endl<<"6、( )";
cout<<endl<<"A.return; B.returu; C.returv; D.reyurn;"<<endl;
cout<<"答案:";
cin>>v6;
if(v6=='A'){
bw6=1;
}
else{
bw6=0;
}
cout<<endl<<endl<<"您的答案如上";
system("cls");
cout<<"检验中";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
system("cls");
bnima=bw1+bw2+bw3+bw4+bw5+bw6;
cout<<"恭喜您,满分6分,您得了"<<bnima<<"分";
Sleep(5000);
system("cls");
cout<<"解析生成中";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
system("cls");
cout<<"你的答案";
cout<<endl<<"#include<iostream>";
cout<<endl<<"#include<"<<v1<<">//字符串该有的头文件";
cout<<endl<<"using "<<v2<<" std;";
cout<<endl<<"int a,b,c,d";
cout<<endl<<"string s1,s2,s3,s4";
cout<<endl<<"int main()";
cout<<endl<<"{";
cout<<endl<<"cin>>s1>>s2>>a>>b>>c>>d";
cout<<endl<<"s3="<<v3<<";(将s1中从a到b的地方给截取下来)";
cout<<endl<<"cout<<"<<v4<<";(输出你截取的东西)";
cout<<endl<<"s4="<<v5<<";(将s2中从c到d的地方给删除下来)";
cout<<endl<<"cout<<s4;";
cout<<endl<<v6<<" 0;";
cout<<endl<<"}";
Sleep(3000);
cout<<endl<<endl<<endl<<"正确答案";
cout<<endl<<"#include<iostream>";
cout<<endl<<"#include<B/C>//字符串该有的头文件";
cout<<endl<<"using A std;";
cout<<endl<<"int a,b,c,d";
cout<<endl<<"string s1,s2,s3,s4";
cout<<endl<<"int main()";
cout<<endl<<"{";
cout<<endl<<"cin>>s1>>s2>>a>>b>>c>>d";
cout<<endl<<"s3=B;(将s1中从a到b的地方给截取下来)";
cout<<endl<<"cout<<C;(输出你截取的东西)";
cout<<endl<<"s4=D;(将s2中从c到d的地方给删除下来)";
cout<<endl<<"cout<<s4;";
cout<<endl<<"A 0;";
cout<<endl<<"}";
cout<<endl<<endl<<"1、";
cout<<"A.cstdio; B.string; c.bits/stdc++.h; d.cmath"<<endl;
cout<<endl<<"2、";
cout<<"A.namespace; B.namespase; C.name space; D.namespacc"<<endl;
cout<<endl<<"3、";
cout<<"A.s1.subbtr(a,b); B.s1.substr(a,b); C.s2.substr(a,b); D.s1.substr(c,d)"<<endl;
cout<<endl<<"4、";
cout<<"A.s; B.s2; C.s1; D.sb;"<<endl;
cout<<endl<<"5、";
cout<<"A.erase(c,b); B.erase(b,c); C.erase(c,a); D.erase(c,d);"<<endl;
cout<<endl<<"6、";
cout<<"A.return; B.returu; C.returv; D.reyurn;";
cout<<endl<<endl<<"观看时间为30秒";
Sleep(30000);
system("cls");
cout<<"您是否要继续答题(1为答题,2为退出高级区,其它数为关机)";
cin>>ss;
if(ss==1){
cout<<"暂未开通";
Sleep(4000);
system("cls");
cout<<"关机中";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
break;
}
if(ss==2){
break;
}
if(ss!=1&&ss!=2){
cout<<"退出启动";
Sleep(2999);
return 0;
}
}
}
if(b==4){
system("cls");
while(1){
cout<<"正在建设中,暂未开放";
Sleep(2000);
cout<<endl<<"您将在2秒钟后返回选择界面";
Sleep(4000);
break;
}
}
if(b!=1&&b!=2&&b!=3&&b!=4){
system("cls");
cout<<"退出中";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
}
}
return 0;
}
新手天翼
开始纠错
注意!helloworld是要使用双赢好包裹的
应为它是一个字符串而不是一个字符
附:您这进本就是限定答案毫无灵活性
万一人家多打一个分好(在编译器里不会报错)
而你的编译器就报错了!
总的来说,比较死板,但还是不错的!
王子逸在2020-11-10 18:41:12追加了内容
或许你是收到XA的启发
但你还没学到很多知识
其实学到的东西都是可以用到游戏里哒
只不过你没有给他放到一个适当的地方
PS:推荐你看看吴庞茂旭的帖子