Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- using namespace std;
- int main(){
- const int betAmount {1};
- int bankaccount {0};
- char betnumber;
- int triestillzero {0};
- int n {0};
- while(rand() % 37) {
- if(rand() % 37 == 0) {
- cout << "You won" << bankaccount + 36.0 * betAmount;
- }else {
- cout << "You lost" << bankaccount - betAmount;
- }}
- cout << "you played " << +1 << "games and u won " << bankaccount << "Euro" << endl;
- // wanna try again button instead of loop?
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement