3,2,1 上链接 上代码!
#include<bits/stdc++.h>
#include<Windows.h>
#define KEY_DOWN(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x8000) ? 1:0)
#define ll long long
#define un unsigned
using namespace std;
int getRand(ll min,ll max){
return (rand()%(max-min+1))+min;
}
string a[5]={"0","1"," "};
string b[100]={"\n","0","1"," ","0","1"," ","0","1"," ","0","1"," ","0","1"," ","0","1"," ","0","1"," "};
string c[100]={"0","1"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "};
int main(){
srand(time(0));
system("color 2");
cout<<"代码雨一按A\n代码雨二按B\n代码雨三按C";
while(1){
if(KEY_DOWN('A')) while(1) cout<<a[getRand(0,4)];
if(KEY_DOWN('B')) while(1) cout<<b[getRand(0,25)];
if(KEY_DOWN('C')) while(1) cout<<c[getRand(0,24)];
}
return 0;
}