Question: Flow chart the Craps please make the flowchart code //System Libraries #include //Input - Output Library #include //Time for rand #include //Srand to set the

Flow chart the Craps please make the flowchart

code

//System Libraries #include //Input - Output Library #include //Time for rand #include //Srand to set the seed #include //File I/O #include //Format the output #include //Strings #include //Math functions using namespace std; //Name-space under which system libraries exist

//User Libraries

//Global Constants const float PERCENT=100.0f;//Conversion to Percent

//Function Prototypes char rollDie(int); //Roll the Dice void fileDsp(ofstream &,int [],int [],int,int,int,int); //File Display void scrnDsp(int [],int [],int,int,int,int); //Screen Display void crpGame(int [],int [],int,int &,int &,int &); //Play Craps

//Execution begins here int main(int argc, char** argv) { //Set the random number seed srand(static_cast(time(0))); //Declare file and game variables ifstream in; //Input File ofstream out; //Output File int nGames; //Number of games, wins/losses int mxThrw=0,numThrw=0,lmGames=100000000;//Game limiter and Throw statistics const int SIZE=13; //Size of our Arrays int wins[SIZE]={}; //Initializing the win array int losses[SIZE]={}; //Initializing the loss array //Initialize variables string inName="GameInfo.dat"; //String Name char outName[]="GameStats.dat"; //Character Array Name in.open(inName.c_str()); //Open the Input file out.open(outName); //Open the Output file while(in>>nGames);//Last value in file becomes the number of games nGames=nGames>lmGames?lmGames:nGames;//Limit games if to high //Play the game the prescribed number of times. int beg=time(0);//Time the game play crpGame(wins,losses,SIZE,nGames,numThrw,mxThrw); int end=time(0);//End time of Game play //Output the game statistics to the screen out<<"Total time to play these Games in integer seconds = "<

}

void scrnDsp(int wins[],int losses[],int SIZE,int nGames,int numThrw,int mxThrw){ cout<

}

char rollDie(int sides){ char die1=rand()%sides+1;//[1,number of sides] char die2=rand()%sides+1;//[1,number of sides] char sum1=die1+die2; return sum1; }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!