娱乐版老虎机代码(随心改)°U°[有意者可以提出意见~]

SunnyLHY 2026-04-11 19:26:13 2026-04-11 19:36:23

#include<iostream>
#include<iomanip>
#include<vector>
#include<set>
#include<map>
#include<cmath>
#include<cstring>
#include<stack>
#include<queue>
#include<list>
#include<bits/stdc++.h>
using namespace std;
long long n;

int main(){
	//freopen("","r",stdin);
	//freopen("","w",stdout);
//	ios::sync_with_stdio(nullptr);
//	cin.tie(false);
//	cout.tie(false);
	n=1000;
	cout<<"~欢迎来到娱乐版老虎机~°U°"<<endl<<"~请开始你的表演~"<<endl<<endl;
	long long o,times=0;
	while(n!=0){
                cout<<"请输入押金";
		cin>>o;
		times++;
		int a=abs(rand()%7);
		int b=abs(rand()%7);
		int c=abs(rand()%7);
		cout<<"下面是掷骰子的结果:"<<endl<<a<<"  "<<b<<"  "<<c<<endl;
		if(times==10)cout<<"获得福利!50游戏币"<<endl,n+=50; 
		if(times==20)cout<<"获得福利!50游戏币"<<endl,n+=50; 
		if(times==30)cout<<"获得福利!50游戏币"<<endl,n+=50; 
		if(times==40)cout<<"获得福利!50游戏币"<<endl,n+=50; 
		if(times==50)cout<<"获得福利!50游戏币"<<endl,n+=50; 
		if(times==60)cout<<"获得福利!50游戏币"<<endl,n+=50; 
		if(times==70)cout<<"获得福利!50游戏币"<<endl,n+=50; 
		if(times==80)cout<<"获得福利!50游戏币"<<endl,n+=50; 
		if(times==90)cout<<"获得福利!50游戏币"<<endl,n+=50; 
		if(times==100)cout<<"获得福利!50游戏币"<<endl,n+=50; 
		if(times==110)cout<<"获得福利!50游戏币"<<endl,n+=50; 
		if(times==120)cout<<"获得福利!50游戏币"<<endl,n+=50; 
		if(times==130)cout<<"获得福利!50游戏币"<<endl,n+=50; 
		if(times==140)cout<<"获得福利!50游戏币"<<endl,n+=50; 
		if(a==b and a==c){
			if(a==0)n+=o*2,cout<<"你剩余:"<<n<<endl<<endl;
			if(a==1)n+=o*3,cout<<"你剩余:"<<n<<endl<<endl;
			if(a==2)n+=o*4,cout<<"你剩余:"<<n<<endl<<endl;
			if(a==3)n+=o*5,cout<<"你剩余:"<<n<<endl<<endl;
			if(a==4)n+=o*6,cout<<"你剩余:"<<n<<endl<<endl;
			if(a==5)n+=o*7,cout<<"你剩余:"<<n<<endl<<endl;
			if(a==6)n+=o*8,cout<<"你剩余:"<<n<<endl<<endl;
//			if(a==7)n+=o*9,cout<<"你剩余:"<<n<<endl<<endl;
//			if(a==8)n+=o*10,cout<<"你剩余:"<<n<<endl<<endl;
		}
		else{
			if(n>=o)n-=o,cout<<"很可惜,您剩余:"<<n<<"游戏币"<<endl<<endl;
			else break;
		}
	}
	cout<<"谢谢参与~三°U°三";
	return 0;
}

共 2 条回复

Huangchen
SunnyLHY