Question: C++ Problem 2 (5 points): diceSum Write a function diceSum which takes one integer argument for a desired sum. The function repeatedly rolls two six-sided
C++
Problem 2 (5 points): diceSum Write a function diceSum which takes one integer argument for a desired sum. The function repeatedly rolls two six-sided dice until their sum is the desired sum. o Your function MUST be named diceSum . Your function takes one integer argument for the desired sum . Your function should not return anything. . If the desired sum is not between 2 and 12 (inclusive), then print the following message and does not roll the dice. The desired sum should be between 2 and 12 The function prints for each roll in the following output . You rolled a
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
