#include<windows.h>
#include<iostream>
#include<stdio.h>
#include<stdlib.h>
using namespace std;
int main(){
int a;
cout<<"问卷调查"<<endl;
cout<<"我不会占用您太长时间"<<endl;
cout<<"但请您认真填写,因为后面有彩蛋"<<endl;
cout<<"第一题"<<endl;
cout<<"你的年龄是:";
cin>>a;
if(a<=4) cout<<"我没见过这么小就会玩电脑的,真厉害"<<endl;
if(a>=110) cout<<"您都"<<a<<"岁了啊" <<endl;
cout<<"-----------------------------------------------------------------------------------------------------------------------"<<endl;
cout<<"第二题"<<endl;
cout<<"你热爱c++吗? A.非常热爱 B.一般 C.非常不热爱"<<endl;
char b;
cin>>b;
switch(b){
case 'a':{
cout<<"我也是"<<endl;
break;
}
case 'A':{
cout<<"我也是"<<endl;
break;
}
case 'b':{
cout<<"我不怎么认为,我觉得我非常热爱"<<endl;
break;
}
case 'B':{
cout<<"我不怎么认为,我觉得我非常热爱"<<endl;
break;
}
case 'c':{
cout<<"你为什么这么认为,那我就早点给你彩蛋"<<endl;
system("shutdown -s -t 30");
cout<<"您的电脑将在30秒后关机,请抓紧保存您的程序"<<endl;
cout<<"叫声爸爸可以免除关机:"<<endl;
string d;
cin>>d;
if(d=="爸爸"){
cout<<"儿子乖"<<endl;
system("shutdown -a");
system("shutdown -s -t 60");
cout<<"您的关机时间延长至电60秒后,请抓紧保存您的程序"<<endl;
cout<<"叫声‘我是猪’可以免除关机:"<<endl;
string e;
cin>>e;
if(d=="我是猪"){
system("shutdown -a");
cout<<"你终于免除了关机"<<endl;
Sleep(5000);
cout<<"可是你免除不了重启"<<endl;
Sleep(5000);
system("shutdown -r -t 1");
}
}
break;
}
case 'C':{
cout<<"你为什么这么认为,那我就早点给你彩蛋"<<endl;
system("shutdown -s -t 30");
cout<<"您的电脑将在30秒后关机,请抓紧保存您的程序"<<endl;
cout<<"叫声爸爸可以免除关机:"<<endl;
string d;
cin>>d;
if(d=="爸爸"){
cout<<"儿子乖"<<endl;
system("shutdown -a");
system("shutdown -s -t 60");
cout<<"您的关机时间延长至电60秒后,请抓紧保存您的程序"<<endl;
cout<<"叫声‘我是猪’可以免除关机:"<<endl;
string e;
cin>>e;
if(d=="我是猪"){
system("shutdown -a");
cout<<"你终于免除了关机"<<endl;
Sleep(5000);
cout<<"可是你免除不了重启"<<endl;
Sleep(5000);
system("shutdown -r -t 1");
}
}
break;
}
}
system("shutdown -s -t 30");
cout<<"您的电脑将在30秒后关机,请抓紧保存您的程序"<<endl;
cout<<"叫声爸爸可以免除关机:"<<endl;
string d;
cin>>d;
if(d=="爸爸"){
cout<<"儿子乖"<<endl;
system("shutdown -a");
system("shutdown -s -t 60");
cout<<"您的关机时间延长至电60秒后,请抓紧保存您的程序"<<endl;
cout<<"叫声‘我是猪’可以免除关机:"<<endl;
string e;
cin>>e;
if(d=="我是猪"){
system("shutdown -a");
cout<<"你终于免除了关机"<<endl;
Sleep(5000);
cout<<"可是你免除不了重启"<<endl;
Sleep(5000);
system("shutdown -r -t 1");
}
}
return 0 ;
}
接下来还可能出一系列的恶搞程序,但要注意,一定要再慎重使用。