Question: Please write the code only in C++. Show after that the code debugs. Write a program that calculates the sample mean of a collection of

 Please write the code only in C++. Show after that the

Please write the code only in C++. Show after that the code debugs.

Write a program that calculates the sample mean of a collection of numbers that the user enters. Y our program should prompt the user for the amount of numbers, and then all of the numbers. The calculation should then be done according to the formula: sample mean, x = , where N is the size of the sample. Test case: enter: 1, 2, 3, 4,5. Test case: enter: 4, 6, 8, 10, 12. 3.0 8.0 Next, your program should caleculate the sample variance of the collection of numbers. sample variance, "-"ELN--, where N is the size of the sample. Test case: enter 7-3.0; 1,2,3, 4, 5. o'-2.5 Test case: enter:8.0; 4, 6, 8, 10, 12 e*= 10.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!