Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 aStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started