Question: Write a C++ program that uses the Rand_Int function given in the textbook. Rand_Int function: int Rand_Int (int a, int b) { return rand( )%
Write a C++ program that uses the Rand_Int function given in the textbook.
Rand_Int function:
int Rand_Int (int a, int b)
{
return rand( )% (b-a+1)+a;
}
The main function should prompt the user for how many rolls of a 12-sides die they would like to roll. Using the Rand_Int function, roll the die and see how many times x happens. What is x? Well, you get to decide. Pick two of the following but make sure your code clearly tells someone what is going on.
How many odd values you get?
How many times you get a value between 1-6 or 7-12?
How many times you get a single digit value or a double digit value
Prompt for a favorite number- how many times did you roll that number?
How many times you got 7 or 11.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
