Hello. I have written a code to run a game of craps...i cant figure out how to run it 100,000 times and count how many wins and losses there are and print the results. i have the craps code posted below. Please help me out i am stuck...
I would put the code int x = 1; after the srand(time(0));. Then before the int sumofdice = rolldice(); I would put the while loop where x is less than or equal to 100,000 and have the loop end after your other while loop. When a player was to win or lose, increment x. If you want to keep track of wins and lost, use variables for that also and increment them based on wins/losses.