敲个警钟
作者:
lyp201208
,
2024-06-01 16:08:54
,
所有人可见
,
阅读 12
无聊了敲个警钟
音量小点…回车退出…
#include <bits/stdc++.h>
#include <windows.h>
#define LLL1 1046
#define LLL3 1319
#define LLL5 1568
#define G 250*1.25
#define H 12.5*1.25
#define S(i) Sleep(i)
#define W(i,j) Beep(i,j)
using namespace std;
HWND hwnd=GetForegroundWindow();
int main () {
ShowWindow(hwnd,SW_MAXIMIZE);
if(MessageBox(NULL,"DANGER是否进入","危险",MB_YESNO|MB_ICONEXCLAMATION)!=IDYES){
return 0;
}
int cn=0;
while(1){
cout<<"DANGER ";
cn++;
if(cn==30){
cout<<endl;
}
W(LLL5,G);S(H);
system("color 41");
if(GetAsyncKeyState(VK_RETURN) &0x8000){
return 0;
}
cout<<"DANGER ";
cn++;
if(cn==30){
cout<<endl;
}
W(LLL1,G);S(H);
if(GetAsyncKeyState(VK_RETURN) &0x8000){
return 0;
}
cout<<"DANGER ";
cn++;
if(cn==30){
cout<<endl;
}
W(LLL5,G);S(H);
system("color 14");
if(GetAsyncKeyState(VK_RETURN) &0x8000){
return 0;
}
cout<<"DANGER ";
cn++;
if(cn==30){
cout<<endl;
}
W(LLL1,G);S(H);
if(GetAsyncKeyState(VK_RETURN) &0x8000){
return 0;
}
cout<<"DANGER ";
cn++;
if(cn==30){
cout<<endl;
}
}
return 0;
}