• 个人简介

    sjysjysjy

    
    #include <bits/stdc++.h>
    #include<windows.h>
    #define int long long
    #define fk flagkuai
    #define sdms shang_di_mo_shi
    #define cp caipiao
    using namespace std;
    int n=1;
    bool flagkuai=0,shang_di_mo_shi=0;
    long long sr,mingy=0,zhim=0,fang=0,che=0,dz=0;
    long long qian=100000;
    void bc() {
    	ofstream out("一个游戏.txt");
    	out<<fk<<' '<<sdms<<' '<<mingy<<' '<<zhim<<' '<<fang<<' '<<che<<' '<<dz<<' '<<qian;
    	out.close();
    }
    void dq() {
    	ifstream in("一个游戏.txt");
    	in>>fk>>sdms>>mingy>>zhim>>fang>>che>>dz>>qian;
    	in.close();
    }
    void say(string a) {
    	for(int i=0; i<a.size(); i++) {
    		cout<<a[i];
    		if(a[i]=='.')Sleep(400);
    		else if(fk)Sleep(20);
    		else Sleep(50);
    
    	}
    	cout<<"\n";
    }
    void caipiao() {
    	srand(time(0));
    	int zc=rand()%10000+1;
    	qian-=2;
    	if(zc%3==0) {
    		say("没中奖\n自身金钱:");
    		cout<<qian<<endl;
    	} else if(zc==10000) {
    		say("中了10000元");
    		qian+=10000;
    		say("自身金钱:");
    		cout<<qian<<endl;
    	} else {
    		qian+=rand()%10+1;
    		say("自身金钱:");
    		cout<<qian<<"\n";
    	}
    }
    void chengxu() {
    	srand(time(0));
    	say("欢迎游玩Dev-cpp_5,11模拟经营游戏");
    	say("作者:卜竣屹 (891)");
    	say("    ***          ***           *   ");
    	say("   *   *        *   *        * *   ");
    	say("    ***          ***           *   ");
    	say("   *   *            *          *   ");
    	say("    ***          ***         ******");
    	say("你要不断收集金钱,做世界首富!");
    	say("本人原创,不喜勿喷");
    	say("Loading......");
    	system("cls");
    }
    void jm() {
    	say("1 赌一把");
    	say("2 购买物品");
    	say("3 个人资料");
    	say("4 58同城应聘");
    	say("5 退出");
    }
    int cz_2(int sr) {
    	if(sr==1) {
    		system("cls");
    		say("1 澳门赌场");
    		say("2 彩票");
    		say("输入0退出");
    		cin>>sr;
    		system("cls");
    		if(sr==1) {
    			int a=rand()%2+1;
    			if(a==1) {
    				say("你赌输了");
    				qian/=2;
    				printf("当前钱数:%d\n",qian);
    			} else {
    				say("你赌赢了,但是,久赌必输");
    				qian*=2;
    				printf("当前钱数:%d\n",qian);
    			}
    		}
    		if(sr==2&&qian>=2) caipiao();
    		else say("你没钱.....");
    	}
    	if(qian>=100000000&&che>=5&&fang>=5&&dz>=5) {
    		say("您已通关,亲爱的世界首富");
    		say("欢迎期待下一版本");
    		say("Goodbye");
    		return 0;
    	}
    	if(sr==5) {
    		say("真的要退出吗");
    		say("请选择是(1)或否(0)");
    		cin >>sr;
    		if(sr=="1") {
    			bc();
    		}
    	}
    	if(sr==3) {
    		say("你个人主页");
    		say("房子数:");
    		cout<<fang<<endl;
    		say("车子数:");
    		cout<<che<<endl;
    		say("自身金钱:");
    		cout<<qian<<endl;
    		say("名誉:");
    		cout<<mingy<<endl;
    		say("知名度");
    		cout<<zhim<<endl;
    	}
    	system("cls");
    	if(sr==4) {
    		say("1.扫大街的 工资:3000");
    		say("2.图灵编程教育老师 工资:5000-8000 职业需求:电子设备一台");
    		say("3.房产中介 工资:10000职业需求:电子设备一台");
    		say("4.洛谷站长(kkksc_03) 工资:15000 职业需求:电子设备一台");
    		say("5.HUAWEI高管 工资:100000职业需求:电子设备一台");
    		say("输入0退出");
    		cin >>sr;
    		if(sr==1) {
    			say("请问水瓶应该投进哪个垃圾桶");
    			say("A.可回收 b.不可回收 C.其他垃圾");
    			cin >>sr1;
    			if(sr1=="A"||sr1=="a") {
    				say("你答对了");
    				qian+=3000;
    				say("自身金钱:");
    				cout<<qian<<endl;
    			} else {
    				say("答错了");
    			}
    			system("cls");
    		}
    		if(sr==2&&dz!=0) {
    			say("1.修改A+B问题 奖金:5000");
    			say("2.修改从一输出到一百问题 奖金:8000");
    			cin >>sr;
    			system("cls");
    			if(sr==1) {
    				say("1  #include <iostream>");
    				say("2  using namespace std;");
    				say("3  int main(){");
    				say("4  	int a,b;");
    				say("5  	cin >>a>>b;");
    				say("6  	cout <<a-1+b-1");
    				say("7	return 0;\n8  }");
    				say("请问是第几行出了问题");
    				cin >>sr;
    				if(sr==6) {
    					qian+=5000;
    					say("自身金钱:");
    					cout<<qian<<endl;
    				} else {
    					say("回答错误");
    				}
    			}
    			system("cls");
    			if(sr==2) {
    				say("1  #include <iostream>");
    				say("2  using namespace std;");
    				say("3  int main(){");
    				say("4  	for(int i=0;i<=100;i++){ ");
    				say("5  		cout <<i<<\" \";");
    				say("6  	}");
    				say("7 	return 0;\n8  }");
    				say("请问是第几行出了问题");
    				cin >>sr;
    				if(sr==4) {
    					qian+=8000;
    					say("自身金钱:");
    					cout<<qian<<"\n";
    				} else {
    					say("回答错误");
    				}
    			}
    		}
    		system("cls");
    	}
    	system("cls");
    
    	if(sr==2) {
    		say("1.房子");
    		say("2.车子");
    		say("3.电子设备");
    		say("输入0退出");
    		cin >>sr;
    		system("cls");
    		if(sr==1) {
    			cout <<"1.三线小城豪宅 价值:500000"<<endl;
    			cout <<"2.二线城市150平大平层(城中心) 价值:3500000"<<endl;
    			cout <<"3.一线城市城边小屋 价值:3000000"<<endl;
    			cout <<"4.一线城市城中心80平 价值:4000000"<<endl;
    			cout <<"5.一线城市城中心180平 价值:9000000"<<endl;
    			cout <<"6.北京四合院 价值:100000000"<<endl;
    			cout <<"7.北京西城100平 价值:10000000"<<endl;
    			cout <<"输入8退出"<<endl;
    			cin >>sr;
    			system("cls");
    			if(sr==1) {
    				if(qian>=500000) {
    					cout <<"购买成功"<<endl;
    					qian-=500000;
    					mingy++;
    					zhim++;
    					fang++;
    					cout <<"自身金钱:"<<qian<<endl;
    					cout <<"名誉:"<<mingy<<endl;
    					cout <<"知名度"<<zhim<<endl;
    				} else {
    					cout <<"购买失败"<<endl;
    				}
    			}
    			if(sr==2) {
    				if(qian>=3500000) {
    					cout <<"购买成功"<<endl;
    					qian-=3500000;
    					mingy+=3;
    					zhim+=3;
    					fang++;
    					cout <<"自身金钱:"<<qian<<endl;
    					cout <<"名誉:"<<mingy<<endl;
    					cout <<"知名度"<<zhim<<endl;
    				} else {
    					cout <<"购买失败"<<endl;
    				}
    			}
    			if(sr==3) {
    				if(qian>=3000000) {
    					cout <<"购买成功"<<endl;
    					qian-=3000000;
    					mingy+=2;
    					zhim+=2;
    					fang++;
    					cout <<"自身金钱:"<<qian<<endl;
    					cout <<"名誉:"<<mingy<<endl;
    					cout <<"知名度"<<zhim<<endl;
    				} else {
    					cout <<"购买失败"<<endl;
    				}
    			}
    			if(sr==4) {
    				if(qian>=4000000) {
    					cout <<"购买成功"<<endl;
    					qian-=4000000;
    					mingy+=4;
    					zhim+=4;
    					fang++;
    					cout <<"自身金钱:"<<qian<<endl;
    					cout <<"名誉:"<<mingy<<endl;
    					cout <<"知名度"<<zhim<<endl;
    				} else {
    					cout <<"购买失败"<<endl;
    				}
    			}
    			if(sr==5) {
    				if(qian>=9000000) {
    					cout <<"购买成功"<<endl;
    					qian-=9000000;
    					mingy+=9;
    					zhim+=9;
    					fang++;
    					cout <<"自身金钱:"<<qian<<endl;
    					cout <<"名誉:"<<mingy<<endl;
    					cout <<"知名度"<<zhim<<endl;
    				} else {
    					cout <<"购买失败"<<endl;
    				}
    			}
    			if(sr==6) {
    				if(qian>=100000000) {
    					cout <<"购买成功"<<endl;
    					qian-=100000000;
    					mingy+=100;
    					zhim+=100;
    					fang++;
    					cout <<"自身金钱:"<<qian<<endl;
    					cout <<"名誉:"<<mingy<<endl;
    					cout <<"知名度"<<zhim<<endl;
    				} else {
    					cout <<"购买失败"<<endl;
    				}
    			}
    			if(sr==7) {
    				if(qian>=10000000) {
    					cout <<"购买成功"<<endl;
    					qian-=10000000;
    					mingy+=10;
    					zhim+=10;
    					fang++;
    					cout <<"自身金钱:"<<qian<<endl;
    					cout <<"名誉:"<<mingy<<endl;
    					cout <<"知名度"<<zhim<<endl;
    				} else {
    					cout <<"购买失败"<<endl;
    				}
    			}
    		}
    		system("cls");
    		if(sr==2) {
    			cout <<"1.五菱宏光 价值:50000"<<endl;
    			cout <<"2.奥迪A3 Sportback 价值:200000"<<endl;
    			cout <<"3.宝马530Li 价值:500000"<<endl;
    			cout <<"4.奔驰S450 价值:1000000"<<endl;
    			cout <<"5.越野房车 价值:100000000"<<endl;
    			cout <<"输入6退出"<<endl;
    			cin >>sr;
    			if(sr==1) {
    				if(qian>=50000) {
    					cout <<"购买成功"<<endl;
    					che++;
    					qian-=50000;
    					cout <<"车子数:"<<che<<endl;
    				} else {
    					cout <<"购买失败"<<endl;
    				}
    			}
    			if(sr==2) {
    				if(qian>=200000) {
    					cout <<"购买成功"<<endl;
    					che++;
    					qian-=200000;
    					mingy++;
    					cout <<"车子数:"<<che<<endl;
    				} else {
    					cout <<"购买失败"<<endl;
    				}
    			}
    			if(sr==3) {
    				if(qian>=500000) {
    					cout <<"购买成功"<<endl;
    					che++;
    					qian-=500000;
    					mingy+=2;
    					cout <<"车子数:"<<che<<endl;
    				} else {
    					cout <<"购买失败"<<endl;
    				}
    			}
    			if(sr==4) {
    				if(qian>=1000000) {
    					cout <<"购买成功"<<endl;
    					che++;
    					qian-=1000000;
    					mingy+=10;
    					cout <<"车子数:"<<che<<endl;
    				} else {
    					cout <<"购买失败"<<endl;
    				}
    			}
    			if(sr==5) {
    				if(qian>=10000000) {
    					cout <<"购买成功"<<endl;
    					che++;
    					qian-=10000000;
    					mingy+=50;
    					cout <<"车子数:"<<che<<endl;
    				} else {
    					cout <<"购买失败"<<endl;
    				}
    			}
    		}
    		if(sr==3) {
    			cout <<"1.手机"<<endl;
    			cout <<"2.电脑"<<endl;
    			cout <<"输入3退出"<<endl;
    			cin >>sr;
    			if(sr==1) {
    				cout <<"1.诺基亚4400 价值:600"<<endl;
    				cout <<"2.iphone 13 价值:1000"<<endl;
    				cout <<"3.HUAWEI mate 60 价值:2500"<<endl;
    				cout <<"4.三星Fond 4 价值:10000"<<endl;
    				cout <<"5.镶钻HUAWEI mate X5 价值:1000000"<<endl;
    				cout <<"输入6退出"<<endl;
    				cin >>sr;
    				if(sr==1) {
    					if(qian>=600) {
    						cout <<"购买成功"<<endl;
    						dz++;
    					} else {
    						cout <<"购买失败"<<endl;
    					}
    				}
    				if(sr==2) {
    					if(qian>=1000) {
    						cout <<"购买成功"<<endl;
    						dz++;
    					} else {
    						cout <<"购买失败"<<endl;
    					}
    				}
    				if(sr==3) {
    					if(qian>=2500) {
    						cout <<"购买成功"<<endl;
    						dz++;
    						mingy++;
    						cout <<"当前名誉"<<mingy<<endl;
    					} else {
    						cout <<"购买失败"<<endl;
    					}
    				}
    				if(sr==4) {
    					if(qian>=10000) {
    						cout <<"购买成功"<<endl;
    						dz++;
    						mingy+=2;
    						cout <<"当前名誉"<<mingy<<endl;
    					} else {
    						cout <<"购买失败"<<endl;
    					}
    				}
    				if(sr==5) {
    					if(qian>=1000000) {
    						cout <<"购买成功"<<endl;
    						dz++;
    						mingy+=10;
    						cout <<"当前名誉"<<mingy<<endl;
    					} else {
    						cout <<"购买失败"<<endl;
    					}
    				}
    			}
    			if(sr==2) {
    				cout <<"1.台式机"<<endl;
    				cout <<"2.一体机"<<endl;
    				cout <<"3.笔记本电脑"<<endl;
    				cin >>sr;
    				if(sr==1) {
    					cout <<"1.华强北散装电脑 价值:500"<<endl;
    					cout <<"2.DELL2009款式 价值:1000"<<endl;
    					cout <<"3.Mac Mini 价值:11000"<<endl;
    					cout <<"4.MAC 价值:25000"<<endl;
    					cout <<"5.MAC PRO 价值:100000"<<endl;
    					cout <<"输入6退出"<<endl;
    					cin >>sr;
    					system("cls");
    					if(sr==1) {
    						if(qian>=500) {
    							cout <<"购买成功"<<endl;
    							qian-=500;
    							dz++;
    						} else {
    							cout <<"购买失败"<<endl;
    						}
    					}
    					if(sr==2) {
    						if(qian>=1000) {
    							cout <<"购买成功"<<endl;
    							qian-=1000;
    							dz++;
    						} else {
    							cout <<"购买失败"<<endl;
    						}
    					}
    					if(sr==3) {
    						if(qian>=11000) {
    							cout <<"购买成功"<<endl;
    							qian-=11000;
    							mingy++;
    							dz++;
    							cout <<"名誉:"<<mingy<<endl;
    						} else {
    							cout <<"购买失败"<<endl;
    						}
    					}
    					if(sr==4) {
    						if(qian>=25000) {
    							cout <<"购买成功"<<endl;
    							qian-=25000;
    							mingy+=3;
    							dz++;
    							cout <<"名誉:"<<mingy<<endl;
    						} else {
    							cout <<"购买失败"<<endl;
    						}
    					}
    					if(sr==5) {
    						if(qian>=100000) {
    							cout <<"购买成功"<<endl;
    							qian-=100000;
    							mingy+=10;
    							dz++;
    							cout <<"名誉:"<<mingy<<endl;
    						} else {
    							cout<<"购买失败"<<endl;
    						}
    					}
    				}
    				if(sr==2) {
    					cout <<"1.散装一体机 价值:500"<<endl;
    					cout <<"2.HUAWEI 一体机 价值:5000"<<endl;
    					cout <<"3.IMAC 价值:50000"<<endl;
    					cin >>sr;
    					if(sr==1) {
    						if(qian>=500) {
    							cout <<"购买成功"<<endl;
    							dz++;
    							qian-=500;
    						} else {
    							cout <<"购买失败"<<endl;
    						}
    					}
    					if(sr==2) {
    						if(qian>=5000) {
    							cout <<"购买成功"<<endl;
    							dz++;
    							qian-=5000;
    							mingy++;
    							cout <<"名誉:"<<mingy<<endl;
    						} else {
    							cout <<"购买失败"<<endl;
    						}
    					}
    					if(sr==3) {
    						if(qian>=50000) {
    							cout <<"购买成功"<<endl;
    							dz++;
    							qian-=50000;
    							mingy+=5;
    							cout <<"名誉:"<<mingy<<endl;
    						} else {
    							cout <<"购买失败"<<endl;
    						}
    					}
    				}
    				if(sr==3) {
    					cout <<"1.散装笔记本 价值:500"<<endl;
    					cout <<"2.某知名品牌二手电脑 价值:1000"<<endl;
    					cout <<"3.华为笔记本 价值:5000"<<endl;
    					cout <<"4.MACBOOk Air 价值:11000"<<endl;
    					cout <<"5.MACBOOK PRO 价值:50000"<<endl;
    					cin >>sr;
    					if(sr==1) {
    						if(qian>=500) {
    							cout <<"购买成功"<<endl;
    							qian-=500;
    							dz++;
    						} else {
    							cout <<"购买失败"<<endl;
    						}
    					}
    					if(sr==2) {
    						if(qian>=1000) {
    							cout <<"购买成功"<<endl;
    							qian-=1000;
    							dz++;
    						} else {
    							cout <<"购买失败"<<endl;
    						}
    					}
    					if(sr==3) {
    						if(qian>=5000) {
    							cout <<"购买成功"<<endl;
    							dz++;
    							qian-=5000;
    							mingy++;
    							cout <<"名誉:"<<mingy<<endl;
    						} else {
    							cout <<"购买失败"<<endl;
    						}
    					}
    					if(sr==4) {
    						if(qian>=11000) {
    							cout <<"购买成功"<<endl;
    							qian-=11000;
    							mingy++;
    							dz++;
    							cout <<"名誉:"<<mingy<<endl;
    						} else {
    							cout <<"购买失败"<<endl;
    						}
    					}
    					if(sr==3) {
    						if(qian>=50000) {
    							cout <<"购买成功"<<endl;
    							dz++;
    							qian-=50000;
    							mingy+=5;
    							cout <<"名誉:"<<mingy<<endl;
    						} else {
    							cout <<"购买失败"<<endl;
    						}
    					}
    				}
    			}
    		}
    	}
    }
    int chengxu2() {
    	string sr1;
    	while(sr!=5) {
    		jm();
    		cin >>sr;
    	}
    	return 0;
    }
    
    
    void ask1() {
    	chengxu2();
    }
    void ask2() {
    	say("是否开启极速模式?\n0 no\n1 yes");
    	cin>>fk;
    	system("cls");
    	if(fk) {
    		say("启极速模式已开启!");
    	} else {
    		say("启极速模式已关闭!");
    	}
    	Sleep(1000);
    	system("cls");
    }
    void ask3() {
    	system("cls");
    	say("兑换码:");
    	string a;
    	cin>>a;
    	if(a=="891198") {
    		say("开启成功!!!");
    		sdms=1;
    	} else if(a=="198891") {
    		say("已关闭...");
    		sdms=0;
    	} else {
    		say("开启失败...");
    	}
    	system("cls");
    }
    int cz() {
    	while(1) {
    		dq();
    		say("1 进入游戏");
    		say("2 极速模式");
    		say("3 上帝模式");
    		say("4 退出游戏");
    		cin>>n;
    		if(n==1) {
    			ask1();
    		} else if(n==2) {
    			ask2();
    		} else if(n==4) {
    			system("cls");
    			say("再也不见!!!!");
    			Sleep(1000);
    			bc();
    			return 0;
    		} else if(n==3) {
    			ask3();
    		} else {
    			say("请重新输入") ;
    			system("cls");
    		}
    		system("cls");
    		bc();
    	}
    }
    signed main() {
    //	chengxu();
    	string name;
    	say("请输入角色名");
    	cin >>name;
    	cout <<name;
    	say(",你好");
    	Sleep(1000);
    	system("cls");
    
    	return cz();
    }
    
  • 通过的题目

  • 最近活动

    This person is lazy and didn't join any contests or homework.
  • 最近编写的题解

    This person is lazy and didn't write any solutions.

题目标签

客观题
1