Question: Use an array of 100 floats. Do not use a vector. Input the numbers using cin until end-of-file (^D). This way you can input the

Use an array of 100 floats. Do not use a vector. Input the numbers using cin until end-of-file (^D). This way you can input the numbers from either standard input (keyboard) or a file using input redirection. As you input the numbers count number of numbers (n). Then make two calls to functions average() and variance(). Remember that the name of an array is a pointer to the base of the array and that is what you pass to the functions. Your program must run correctly for the following input:

10 2 5 20 8 1 15 6 

Be sure to handle end cases such as n = 0, 1, or greater than 100. Hand in a printout of your program and typescript of the sample run for the above input.

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!