制作草率,有BUG留言
#include <bits/stdc++.h>
#include<windows.h>
using namespace std;
void yiqiong(int x,int j){
srand(time(0));
char shijian[6][100]={"写代码","装逼","写作业","扶老奶奶过马路","学习科学","熬夜"};
char jilishi[6][100]={"全部AC","获得众人敬仰","全部都会","被表扬","牛顿附体","熬出黑眼圈"};
char daxiong[6][100]={"全部WA","遭雷劈","蒙的都错","被讹钱","牛顿把你揍了一顿","一下就困"};
int aaa[6] = {0};
for(int i = 0;i < j;i++){
int tmp = rand() % 5;
if(aaa[tmp] == 1){
while(aaa[tmp] == 1) tmp = rand() % 5;
}
cout << "宜" << shijian[tmp] << " " << jilishi[tmp] << endl;
aaa[tmp] = 1;
}
for(int i = 0;i < x;i++){
int tmp = rand() % 5;
if(aaa[tmp] == 1){
while(aaa[tmp] == 1) tmp = rand() % 5;
}
cout << "不宜" << shijian[tmp] << " " << daxiong[tmp] << endl;
aaa[tmp] = 1;
}
}
int main(){
srand(time(0));
string str="求签算命,一定很不准";
for(int i=0;i<str.size();i++){
cout<<str[i];
Sleep(100);
system("color 1b");
system("color 3c");
}
Sleep(100);
system("cls");
int qingkuang = rand() % 5;
int x,j;
char xiongji[6][10]={"大吉","小吉","中平","小凶","大凶"};
cout << xiongji[qingkuang] << endl;
if(qingkuang == 0) cout << "诸事大吉";
else if(qingkuang == 1){
x = 1,j = 3;
yiqiong(x,j);
}else if(qingkuang == 2){
x = 2,j = 2;
yiqiong(x,j);
}else if(qingkuang == 3){
x = 3,j = 1;
yiqiong(x,j);
}else cout << "诸事不吉";
return 0;
}