Question: I'm working on a program that is supposed to do this. I'm struggling on the arrays part and I need some help. I already have
I'm working on a program that is supposed to do this.

I'm struggling on the arrays part and I need some help. I already have the guessing part done
"
#include
#include
using namespace std;
int main()
{
int guess, count =0;
int random_number;
random_number = 1+ rand() % 30;
do
{
cout
cin>> guess;
if (guess
cout
else
( guess > random_number);
cout
count++;
}
while (!random_number = guess);
cout
cout
system ("pause");
return 0;
}
"
First simulate 6 die being rolled. Save all the values in an integer array. Use a standard for loop to populate the integer array with your random numbers. (Note: die have 6 sides.) Next, add up the values of the six dice and save that value as an integer variable Now, ask the user to try and guess the sum of the six dice. (From 6 - 36) If the guess is correct, tell the user, and indicate how many guesses it took. If the guess is incorrect, tell the user to guess higher or lower (based on how they guessed previously), and instruct to guess again. Repeat the previous step until the user guesses correctly When the user guesses correctly, also show the user the values of the six dice. You must use a range based loop to display the values in your array
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
