Name: Roderick 2012-03-27 23:30
I made DIS:
//main.cpp
#include <iostream>
#include <string>
#include "Header.h"
#include "functions.cpp"
using namespace std;
int main()
{
double money;
string bet, bet1;
int bet2;
instructions();
betamount(&money);
bettype(&bet, &bet1, &bet2);
return 0;
}
//header.h
#include <iostream>
using namespace std;
void instructions();
void betamount(double *pointer);
void bettype(string *bettype, string *bettype1, int *bettype2);
void spin();
void winnings();
//functions.cpp
#include <iostream>
using namespace std;
void instructions()
{
cout<<"Rulette Game:"<<endl<<"Welcome to the roulette game"<<endl;
cout<<"First type in the amount you would like to bet."<<endl;
cout<<"Second type in how you would like to bet (number, odds/even, dozen)."<<endl;
cout<<"Finally ender a seed value for srand() and it will give your number winnings."<<endl<<endl;
}
void betamount(double *bet)
{
cout<<"Amount you will bet: $";
cin>>*bet;
}
void bettype(string *bettype, string *bettype1, int *bettype2)
{
cout<<"What type of bet would you like to place? (number, odds/even, dozen): ";
cin>>*bettype;
if (*bettype=="number")
{
cout<<"Enter your number: ";
cin>>*bettype2;
}
else if (*bettype=="odd/even")
{
cout<<"odd or even? ";
cin>>*bettype1;
}
else
{
cout<<"1. 1-12\n2. 13-24\n3. 25-36\n\nEnter the number corresponding to the dozen you would like to choose: ";
cin>>*bettype2;
}
}
//main.cpp
#include <iostream>
#include <string>
#include "Header.h"
#include "functions.cpp"
using namespace std;
int main()
{
double money;
string bet, bet1;
int bet2;
instructions();
betamount(&money);
bettype(&bet, &bet1, &bet2);
return 0;
}
//header.h
#include <iostream>
using namespace std;
void instructions();
void betamount(double *pointer);
void bettype(string *bettype, string *bettype1, int *bettype2);
void spin();
void winnings();
//functions.cpp
#include <iostream>
using namespace std;
void instructions()
{
cout<<"Rulette Game:"<<endl<<"Welcome to the roulette game"<<endl;
cout<<"First type in the amount you would like to bet."<<endl;
cout<<"Second type in how you would like to bet (number, odds/even, dozen)."<<endl;
cout<<"Finally ender a seed value for srand() and it will give your number winnings."<<endl<<endl;
}
void betamount(double *bet)
{
cout<<"Amount you will bet: $";
cin>>*bet;
}
void bettype(string *bettype, string *bettype1, int *bettype2)
{
cout<<"What type of bet would you like to place? (number, odds/even, dozen): ";
cin>>*bettype;
if (*bettype=="number")
{
cout<<"Enter your number: ";
cin>>*bettype2;
}
else if (*bettype=="odd/even")
{
cout<<"odd or even? ";
cin>>*bettype1;
}
else
{
cout<<"1. 1-12\n2. 13-24\n3. 25-36\n\nEnter the number corresponding to the dozen you would like to choose: ";
cin>>*bettype2;
}
}