C++ PLS HELP Create a program that will allow the user to \"roll\" a random numb
ID: 659505 • Letter: C
Question
C++ PLS HELP
Create a program that will allow the user to "roll" a random number of 6 sided dice. The program should include the following
A function that will simulate a single 6 sided die.
This will no inputs and return a random number between 1 and 6.
A function that will simulate rolling multiple dice.
This will accept a single input for the number of dice, and return the sum of that many random dice.
It should use the first function.
The function should use a default value of 3 dice if the user doesn't input any.
The main program should repeatedly ask the user how many dice they roll, and then give the user the result of that many dice.
The program should not end until the user says that they want to roll 0 dice.
Do not let the user type in a negative number of dice, or more than 100 dice.
Explanation / Answer
#include #include /* function main begins program execution */ int main() { printf("%d", RAND_MAX); return 0; /* indicates successful termination */ } /* end main */Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.