Question: Write a function rollDie() that simulates the throwing of a die Number is from 1 to 6 In your main function, ask user for the

Write a function rollDie() that simulates the throwing of a die

Number is from 1 to 6

In your main function, ask user for the seed

Set the seed

Then call the function defined to get the value of the die

If the die is 5 or 6, display win

Else, display lose

Write a function rollDie() that simulates the throwing of a die Number

1 #include kiostream 2 include cstdlib 3 using namespace std; 5 int re ollDie 7 int main() 8 int seed 9 cout Ente seed endl 10 11 cout feb 14. 12 return 0; 13 14 main.cpp

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!