Write program to display sum,mean,variance, and std deviation of an unknown number of numbers that does not exceed 20.
(The output should look like this
I will give you the sum, mean, and std dev of any series of numbers.
How many numbers will you enter (up to 20)? 7
Type each number, followed by the enter key.
Enter Number 1: 12
Enter Number 2: 22
Enter Number 3: 34
Enter Number 4: 43
Enter Number 5: 45
Enter Number 6: 54
Enter Number 7: 99
You have entered the following:
12 22 34 43 45
54 99
The sum is 309
The mean is 44.1429
The variance is 789.1436
The std dev is 28.0917
My question is:
1) How do you make it so that if the user enters more than 20 numbers that it will display a message and proceed to generate the data and the calculated values.
2)Calculate the variance
3)How do you make it so that when you print out the numbers that were entered that they will be displayed 5 numbers to a line.
(The output should look like this
I will give you the sum, mean, and std dev of any series of numbers.
How many numbers will you enter (up to 20)? 7
Type each number, followed by the enter key.
Enter Number 1: 12
Enter Number 2: 22
Enter Number 3: 34
Enter Number 4: 43
Enter Number 5: 45
Enter Number 6: 54
Enter Number 7: 99
You have entered the following:
12 22 34 43 45
54 99
The sum is 309
The mean is 44.1429
The variance is 789.1436
The std dev is 28.0917
My question is:
1) How do you make it so that if the user enters more than 20 numbers that it will display a message and proceed to generate the data and the calculated values.
2)Calculate the variance
3)How do you make it so that when you print out the numbers that were entered that they will be displayed 5 numbers to a line.