In CS999 midterm examination, Prof. Wang wants to calculate the average score of his class. But unfortunately, he has forgotten the number of students in his class, so, the number of scores is unknown in advance. To help him solve this problem, you may need dynamic memory allocation to enlarge memory to store the scores once needed.
All scores are non-negative numbers, and -1 indicates the end of input.
After all the scores are stored into your array, you can calculate the average score. Then you should output it.
The following is a demo process for the program if you can do it successfully: (red indicates input)

Input contains unknown number of lines.
All non-nagative inputs represent scores. They are floating point numbers with at most 1 decimal point digit.
The final input is -1, indicating the end of input.
First, you should output a prompt:
Please type scores to be calculated:
Note that there should be no whitespaces after the colon, and you should end this prompt with a newline.
Then, once you need to resize your array, output a message like this:
(resize) from 5 to 10
Finally, after getting the final input -1, you should output Average score:
, followed by the average score of the inputs.
*All of your outputs should be printed with “printf” to only 2 decimal point digits floating point number, even if a number is an integer.
*The last number -1 is not a score, so:
(1) It should not be calculated when you calculate average score.
(2) It will not be stored into your array, and therefore will not cause a resize.
92.6
17.5
71.0
66.3
51.9
99.6
-1
Please type scores to be calculated:
(resize) from 5 to 10
Average score: 66.48