Question: Write a program that will do the following pseudo-code: Display a title, such as Working with random numbers and simple mathematical functions. Declare as many

Write a program that will do the following pseudo-code:

  1. Display a title, such as Working with random numbers and simple mathematical functions.

  2. Declare as many variables as needed to enhance the readability of your program.

  3. Generate 3 random numbers between 1 and 100 inclusive, named: r1, r2, and r3

  4. Calculate avg, the average of the 3 random numbers.

  5. Calculate sum = (r1 - avg)2 + (r2 - avg)2 + (r3 - avg)2

  6. Calculate stDev, the standard deviation of the 3 random numbers: it is the square root of

    (sum divided by 2).

  7. Calculate gMean, the geometric mean of the random numbers (the product of these

    numbers to the power of 1 / 3)

  8. Display the random numbers, their average, standard deviation and geometric mean with

    description.

Run this program twice.

This is for a C++ assignment, and I am having trouble on what it's asking after step 1. An explanation and guide through would be great, thanks.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!