Question: c++ help ! Part 4: Write a function named rand_mv that generates a random floating-point value. rand_mv should take in a user specified mean and

 c++ help ! Part 4: Write a function named rand_mv that

c++ help !

Part 4: Write a function named rand_mv that generates a random floating-point value. rand_mv should take in a user specified mean and variance. Assume the corresponding function prototype is double rand mv (double mean, double var) rand mv) should then calculate A and B, and generate a random value using randFloat (a,b) The main function will provide two prompts, the first asking for the desired mean from the user. Note: The values denoted as x.xx represent a value of type float in all cases. It is not a number formatted specifically as X.XX So if the output is 4.99999 it should remain 4.99999 and not be formatted to look like 4.99 Enter Mean: x.xx The second prompt will ask for the variance. Enter Variance x.xx Finally, in order to know if you have correctly implemented this function your randMV function must output to the terminal the A and B values computed by randMV Note: Normally you would not have randMV output these values. This is just so I can test your solution. Even though we are not testing the random value that your function returns, you should still have randMV return this value, since that really is the purpose of this function. Example: if your randMV function computes the following: A We should have output to the terminal as follows: 2.0 4.0 2.0 and B 4.0 Part 4: Write a function named rand_mv that generates a random floating-point value. rand_mv should take in a user specified mean and variance. Assume the corresponding function prototype is double rand mv (double mean, double var) rand mv) should then calculate A and B, and generate a random value using randFloat (a,b) The main function will provide two prompts, the first asking for the desired mean from the user. Note: The values denoted as x.xx represent a value of type float in all cases. It is not a number formatted specifically as X.XX So if the output is 4.99999 it should remain 4.99999 and not be formatted to look like 4.99 Enter Mean: x.xx The second prompt will ask for the variance. Enter Variance x.xx Finally, in order to know if you have correctly implemented this function your randMV function must output to the terminal the A and B values computed by randMV Note: Normally you would not have randMV output these values. This is just so I can test your solution. Even though we are not testing the random value that your function returns, you should still have randMV return this value, since that really is the purpose of this function. Example: if your randMV function computes the following: A We should have output to the terminal as follows: 2.0 4.0 2.0 and B 4.0

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!