这个代码是本人在大一c++学习时间,在过年的时候写出来的,用于自娱自乐,分为代码文件与文本文件,使用的时候最好全屏显示。我不知道您会怎么样,总之我已经玩不过他了~
代码文件:
#include <iostream>
#include <fstream>
#include <iomanip>
#include <windows.h>
using namespace std;
struct shi{
char a[16];
int b;
};
int main()
{
C:
system("color 71");
cout<<"请";
Sleep(100);
cout<<"输";
Sleep(100);
cout<<"入";
Sleep(100);
cout<<"你";
Sleep(100);
cout<<"的";
Sleep(100);
cout<<"成";
Sleep(100);
cout<<"语";
Sleep(100);
cout<<"汉";
Sleep(100);
cout<<"语";
Sleep(100);
cout<<"什";
Sleep(100);
cout<<"么";
Sleep(100);
cout<<"语"<<endl;
goto B;
A:
cout<<"来啊!"<<endl;
Sleep(900);
cout<<"继续啊!"<<endl;
Sleep(900);
cout<<"做作啊!"<<endl;
Sleep(900);
cout<<"互相伤害啊!"<<endl;
B:
char x[16];
for(int i=0;i<16;i++){
x[i]='1';
}
cin>>x;
int z=0;
for(int i=0;i<16;i++){
if(x[i]=='1'){
break;
}else{
z++;
}
}
ifstream ip;
ip.open("dataa",ios::in);
fstream op;
op.open("dataa",ios::app);
shi n;
ip>>n.a>>n.b;
int c;
do{
c=n.b;
// cout<<n.a[0]<<n.a[1]<<" "<<x[z-3]<<x[z-2]<<endl;
// cout<<n.a<<endl;
if(n.a[0]==x[z-3]&&n.a[1]==x[z-2]){
cout<<endl;
cout<<n.a<<endl;
cout<<endl;
Sleep(500);
cout<<"我";
Sleep(100);
cout<<"快";
Sleep(100);
cout<<"吧"<<endl;
Sleep(500);
cout<<"渣";
Sleep(100);
cout<<"渣";
Sleep(100);
cout<<"!"<<endl;
goto A;
}
ip>>n.a>>n.b;
if(c==1){
cout<<endl;
cout<<" `.:;==II;:.`"<<endl;
cout<<" ;o#MMMMMMMMMMMMMMM#O=`"<<endl;
cout<<" +MMM#############MMMMM8MM;"<<endl;
cout<<" IMM##############MMi iMI;IM8"<<endl;
cout<<" ;MM#############MMO` ME;=:M#"<<endl;
cout<<" ~MM#############MM; 8M;I;IMO"<<endl;
cout<<" EM#############MM: E#;I=:EM~"<<endl;
cout<<" IME######EEEEE#MM; #8:II;oM="<<endl;
cout<<" #M#####MMMMMMMMM8 .M#:IIiMo"<<endl;
cout<<" :MEE#8O8Ooo++iii` .MMIIIMo"<<endl;
cout<<" `M; `#M+OM8~"<<endl;
cout<<" =M. ::;I~ `:. .Mo:::E#`"<<endl;
cout<<" 8M `:i=;~:I;` :OO=:` EE"<<endl;
cout<<" M# ~=oOoio~:` Io8O++o:. #O"<<endl;
cout<<" .M8 iI:~~..` ~I;oE88OO=` ~#M"<<endl;
cout<<" ;M+ ;i` `. .:I` Ii;` `MMO:"<<endl;
cout<<" iMI`i; :.`.` .:.;~ .Ii: M#"<<endl;
cout<<" oM;.=:.~ `;i+o+;` .;~ I==` ME"<<endl;
cout<<" oM::I~.;=;::I~;+++I==: :ii. ;M8"<<endl;
cout<<" oM;:=:``=oi+ii=I;IE;`` .ii~ OM;"<<endl;
cout<<" iM+:=.. `=;:~;=+: `=i~ .MM"<<endl;
cout<<" .M#;=. `.~~:` ==~ EM;"<<endl;
cout<<" IME=~ ==. IMM:"<<endl;
cout<<" ~oMMOi~` ;=+MMI"<<endl;
cout<<" =M88##MMEE#EEE8EE#MM#8#M"<<endl;
cout<<" EM;;;;::Ii8#+;EE=I;:ii:EM."<<endl;
cout<<" .MO:IIII:8o+E:IMi;;;;;M+~#M`"<<endl;
cout<<" =ME::;:::ME+#;OMI;;;I:EMI;MM"<<endl;
cout<<" =#MMMMMMME:o:#M;:::::#Mo;=M8"<<endl;
cout<<" Ii: E8.~.M+:;;;+MM#MM#MM8I;:8M:"<<endl;
cout<<" `o8+= #O Mi;;;;;;MI oM:;;;;=M8"<<endl;
cout<<" I :;IioE+: 88 :M=:I;;;IM~ #E;;;;:;MM"<<endl;
cout<<" ~~ :O =O;.II=~ M+ iM::;;;;;M. `M+::;;+OMM."<<endl;
cout<<" ~E+ .#I. IiI:~` =M` `MM#EE8O+EM :M#MMMM8iMM"<<endl;
cout<<" ``#I ~+ 8o: M8O+= :Mo `Mo``..~:=M` oM...` oM="<<endl;
cout<<" ~`i #E+; +MMEoMi`. :Oi;M`~oM8...``.OMi"<<endl;
cout<<" oOO; oM~`II.`.`oM~`;E#8=. ` `:oMM:"<<endl;
cout<<" i# :MI ```.. oM....```..~;OMMEOoEMM8;"<<endl;
cout<<" ; ~MME+iii=+MO```````.Ii=;` M:.##`"<<endl;
cout<<" `:I===I;;oMM#8o++ii=i+++oO88MM8oo:"<<endl;
cout<<" .~;III=I;;;;;:.` "<<endl;
cout<<"大哥我错了,";
Sleep(900);
cout<<"大哥我错了,";
Sleep(900);
cout<<"大哥我错了。。。。"<<endl;
}
}while(c!=1);
cout<<"来来来,继续继续,下注啊!"<<endl;
goto C;
return 0;
}
文本文件:
胸有成竹 0
竹报平安 0
安富尊荣 0
荣华富