Question: I have legit no idea how to do this, having serious trouble understanding void functions in general, and this assignment requires 2 of them and
I have legit no idea how to do this, having serious trouble understanding void functions in general, and this assignment requires 2 of them and to use reference variables. Any insight into these topics would be greatly appreciated. I really dont see the need for using reference in these functions but i feel like that might be my lack of understanding. Thanks in advance.
For this assignment, you will write a C++ program that asks the user to enter the amount and number of sides for dice to roll. Your program should output the results of the dice rolls and the sum of the rolled dice. See the Program Requirements and Sample Runs for more details. Program Requirements 1. Include all appropriate comments as usual. 2. Use the sample runs to ensure that all output is spelled/spaced correctly. 3. You must write two functions: - GetDice should be a void function that accepts two arguments as reference parameters. This function will prompt the user to enter the two values. If either value is negative, the program should output an error message and end immediately. - Rolldice should also be a void function that accepts the amount and number of sides for the dice as value parameters. This function will output how many of what dice will be rolled, output the values for each roll, and output the sum of the rolls. 4. Use Day 10's cstylerandom.cpp (in today's notes) for help with getting random values. 5. main should seed the random number generator to the value 100
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
