Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

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_2

Step: 3

blur-text-image_3

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

More Books

Students also viewed these Databases questions

Question

1.what is the significance of Taxonomy ?

Answered: 1 week ago

Question

What are the advantages and disadvantages of leasing ?

Answered: 1 week ago

Question

Name is needed for identifying organisms ?

Answered: 1 week ago

Question

1. Organize and support your main points

Answered: 1 week ago

Question

3. Move smoothly from point to point

Answered: 1 week ago

Question

5. Develop a strong introduction, a crucial part of all speeches

Answered: 1 week ago