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
|
#include <iostream>
using namespace std;
void calcAndShowResults( int bi_level, double rakeb, int games, double roi )
{
double result = bi_level / 100.0 * roi * games;
cout << "\n\n*** Projected earnings for $" << bi_level << " bi with %" << roi << "roi, over " << games << " games ***\n\n";
cout << "$" << result << "\n" << "$" << rakeb * games << " @ 42% RB" << "\n" << "$" << rakeb * games + result << " Total inc RB" << "\n\n";
}
int main()
{
double roi = 0;
int games = 0;
int input = 0;
double rakeb_60 = 0.5292;
double rakeb_100 = 0.7896;
double rakeb_200 = 1.4028;
double rakeb_300 = 1.8858;
double bi_level = 0;
double result = 0;
char recalc = 'y';
cout << "\t\tProjected Earnings Calculator\n\n";
while ( recalc == 'y' )
{
cout << "1. $60\n" ;
cout << "2. $100\n" ;
cout << "3. $200\n" ;
cout << "4. $300\n\n" ;
cout << "What buy-in level do you want to calculate: ";
cin >> input;
cout << "\nEnter your projected roi: " ;
cin >> roi;
cout << "\nNumber of games: ";
cin >> games;
if( input == 1 ) calcAndShowResults( 60, rakeb_60 , games, roi );
else if( input == 2 ) calcAndShowResults( 100, rakeb_100, games, roi );
else if( input == 3 ) calcAndShowResults( 200, rakeb_200, games, roi );
else if( input == 4 ) calcAndShowResults( 300, rakeb_300, games, roi );
cout << "Make another calculation? Y/N: ";
cin >> recalc;
if ( recalc == 'n')
{
break;
}
}
}
|