Inline Code Example Here
I have been trying to solve this but i just can't get it right... can someone help me pls?
Using array to summarize survey results
40 Students were asked to rate the quality of the food in the student cafeteria on
a scale of 1 to 10 (1 means bad and 10 means excellent). Place the 40
responses in an integer array and summarize the results of the survey.
• Summarize the number of responses of each type (1 through 10)
• The array responses is a 40-element array of students’ responses.
• The array frequency is a 11-element array to count the number of
occurrences of each response.
responses array elements are = {1, 2, 6, 4, 8, 5, 9, 7, 8, 10, 1, 6, 3, 8, 6, 10,
3, 8, 2, 7, 6, 5, 7, 6, 8, 6, 7, 5, 6, 6, 5, 6, 7, 5, 6, 4, 8, 6, 8, 10}
Hint: initialize frequency counter to zero. Initialize responses array elements
**Sample Output**
Scale Frequency
1 2
2 2
3 2
4 2
5 5
6 11
7 5
8 7
9 1
10 3