Question: Write a program that calls the random number generator two times to simulate rolling a pair of dice. It should store the two numbers into

Write a program that calls the random number generator two times to simulate rolling a pair of dice. It should store the two numbers into variables. It will then determine if the dice roll is a winner (doubles OR add up to 7). Remember to add two includes and also to seed the random number generator to the clock.

This will roll two dice and add them together.

Doubles, or a total of 7 - YOU ARE A WINNER!!!

First dice: 4

Second dice: 2

BETTER LUCK NEXT TIME

Sample output 2 is given below.

This will roll two dice and add them together.

Doubles, or a total of 7 - YOU ARE A WINNER!!!

First dice: 1

Second dice: 1

YOU WON!!!!

Sample output 3 is given below.

This will roll two dice and add them together.

Doubles, or a total of 7 - YOU ARE A WINNER!!!

First dice: 4

Second dice: 3

YOU WON!!!!

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!