Programming Practice

Given a sequence of n elements, x1, x2, ¼, xn-1, xn, the mean (m) and the standard deviation (s) are defined as:

respectively. Suppose there are 15 students. Read the score of theses students (0 to 100) and compute the mean and standard deviation of the scores.

Enter the score of student No. 1: 78
Enter the score of student No. 2:
65
Enter the score of student No. 3:
90
Enter the score of student No. 4:
52
Enter the score of student No. 5:
84
Enter the score of student No. 6:
95
Enter the score of student No. 7:
72
Enter the score of student No. 8:
68
Enter the score of student No. 9:
54
Enter the score of student No. 10:
80
Enter the score of student No. 11:
75
Enter the score of student No. 12:
93
Enter the score of student No. 13:
54
Enter the score of student No. 14:
81
Enter the score of student No. 15:
70

The mean is 74.07.
The standard deviation is 13.35.