0
已解决
黄中阳
初级光能
初级光能
简陋的问答模拟器1.0
#include<bits/stdc++.h>
#include<windows.h>
#include<conio.h>
#include<iomanip>
using namespace std;
bool qiandao;
int dao=20,douzi;
string nei[1000],biao[1000];
int cnt;
void Ti(){
SetConsoleTitle("问答**");
}
int main(){
Ti();
cout<<"\t\t 这里是问答**\n";
cout<<"\t\tThis is the Wenda system";
Sleep(3000);
system("cls");
for(int i=1;i<=10;i++){
cout<<"正在加载中";
cout<<".";
Sleep(100);
cout<<".";
Sleep(100);
cout<<".";
Sleep(100);
system("cls");
}
while(1){
system("cls");
cout<<"________________\n";
cout<<"|我的酷町豆:"<<douzi<<"|\n";
cout<<"________________\n";
cout<<"1.我要提问 2.赚豆豆 ";
if(!qiandao) cout<<"3.签到";
cout<<"\n\n";
for(int i=1;i<=cnt;i++){
cout<<"贴"<<i<<" "<<biao[i]<<" "<<"打开扣"<<i+3<<endl<<endl;
}
char c;
c=getch();
if(c>='4'){
int shu=c-'0'-3;
system("cls");
cout<<biao[shu]<<endl;
cout<<"____________________________________\n";
for(int i=0;i<nei[shu].size();i++){
if(nei[shu][i]=='$') cout<<endl;
else cout<<nei[shu][i];
}
cout<<"\n任意键退出\n";
char z;
z=getch();
continue;
}
if(c=='2'){
system("cls");
int minn=1,maxn=5;
srand((int)time(NULL));
int a=minn+rand()%(maxn-minn+1);
cout<<"赚到了"<<a<<"个豆\n";
douzi+=a;
Sleep(3000);
}
if(c=='3'){
system("cls");
if(qiandao){
cout<<"您已经签过了哦!";
Sleep(2000);
continue;
}
else{
int minn=1,maxn=dao;
srand((int)time(NULL));
int a=minn+rand()%(maxn-minn+1);
dao+=2;
douzi+=a;
qiandao=1;
cout<<"恭喜获得"<<a<<"个酷町豆";
Sleep(2000);
continue;
}
}
else if(c=='1'){
while(1){
system("cls");
int xuan=0;
string timu,neirong;
cout<<"悬赏金额:";
cin>>xuan;
cout<<"\n题目:";
getline(cin,timu);
getline(cin,timu);
cout<<"\n内容(换行用$表示):\n";
getline(cin,neirong);
cout<<"\n是否发布: 是:1 否:0\n";
int x;
cin>>x;
if(x==1){
if(xuan<10){
MessageBox(NULL,"悬赏金额不能低于10","提示",MB_OK);
continue;
}
else if(xuan>douzi){
MessageBox(NULL,"酷町豆不够","提示",MB_OK);
continue;
}
cout<<"发布成功!";
douzi-=xuan;
cnt++;
nei[cnt]=neirong;
biao[cnt]=timu;
Sleep(1000);
break;
}
else break;
}
continue;
}
}
return 0;
}
by Lightning
以后会继续更新……
有 大 佬 知 道 怎 样 存 档 吗?
有哪个工作室想要此代码的版权吗?
0
0
0
0
0
0
0
0