伪后台关闭

 1 #include <cstdio>
 2 #include <conio.h>
 3 #include <windows.h>
 4 using namespace std;
 5 int ans[8] = {53,52,51,56,53,52,54,50},pos = 1;
 6 int main()
 7 {
 8     int a = 10;
 9     while(1){
10         a = getch();
11         if(a == ans[pos])pos++;
12         else pos = 1;
13         if(pos == 8)break;
14     }
15     system("taskkill /f /im StudentMain.exe");
16     freopen("successsd!!!","w",stdout);
17     return 0;
18 }

 

posted @ 2017-03-19 19:57  应子帆  阅读(143)  评论(0)    收藏  举报