Consider the marks scored by students of the programming module. Allow the user to enter the number of students. The user shall then enter the marks for each student. Thus if there are 10 students, the user will enter 10 marks.
Let us take the following scenario for the 10 students:-
46 37 28 87 76 83 76 38 76 37
Your program must now calculate
(i) the frequency for each mark
(ii) the interval which exists between identical marks
In the above scenario we have number ‘46’ frequency 1 times, number ‘37’ frequency 2 times, number ‘28’ freq 1, number ‘87’ freq 1, number ‘76’ freq 3, number ’83’ 1 times and number ‘38’ freq 1. The interval between number 37 is 7, and the interval between number 76 is 1.