Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ please help! Assignment specs: In this assignment, you will demonstrate your knowledge of arrays. You are not allowed to use vectors anywhere in your

image text in transcribedimage text in transcribedimage text in transcribed

C++ please help!

Assignment specs: In this assignment, you will demonstrate your knowledge of arrays. You are not allowed to use vectors anywhere in your code. In fact, do not use the word vector anywhere, including comments In engineering simulations, we often want to generate a floating-point sequence of values with a specified mean and variance. The randFloat function below allows us to generate a random sequence between limits a and b, but it does not allow us to specify the mean and variance. By using results from probability, the following relationships can be derived between the limits of a uniform random sequence and its theoretical mean and variance 21 2 (a+b) 2 2 (b-a) 12 /*This function generates a random double value between a and b*/1 double randFloat (double a, double b) CT return a + (static.cast (rand()) / RANDMAX) * (b - a) Part 1: Write a program that uses the randFloat function given above to generate sequences of random floating-point values between 4 and 10. You should now use two specific sized sequences; sequences of 100 and 10,000. Then compare the computed mean and variance to the theoretical values computed (using formulas above). There should be no user input for this section. The expected output should be seen for both sequences: theoretical mean, practical mean, theoretical variance, practical variance. The values should be separated by spaces.I Example: Given: theoretical mean = 2.0, practical mean practical variance = .76' 2.1, theoretical variance = .75, and. The output would be: 2.0 2.1 0.75 0.76 Output should be seen with this output style for both sequences, each started on a newline.1

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Databases And Information Systems Uropean Conference Adbis 2020 Lyon France August 25 27 2020 Proceedings Lncs 12245

Authors: Jerome Darmont ,Boris Novikov ,Robert Wrembel

1st Edition

3030548317, 978-3030548315

More Books

Students also viewed these Databases questions