1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
|
#include<iostream>
using namespace std;
#include<Math.h>
void main()
{
char op,e,z,o,q;
int x,n,t,zero,bet,remaining,result,wins,losses,wheel;
int start = 100;
bet = 5;
zero = 50;
n = start + bet;
t = start - bet;
cout<<"welcome to roulette, you can bet on Even, Odd, or zero\n";
cout<<"use E,O or Z, each bet is 5 dollars, if you bet Zero and win you win 50\n";
cout<<"you can choose Q to quit game,the game ends automatically when the moneys gone\n\n\n\n";
do
{
cout<<"you have "<<start<<endl;
cout<<"please select E,O,Z,or,Q\n";
cin>>op;
if(op == 'e' || op == 'E')
{
for(int i=1;i<=1;i++)
{
x= rand() % 10;
cout<<x<<endl;
}
}
cout<<"do you want to continue\n";
cin>>e;
}
while((e == 'y')|| (e == 'Y'));
}
|