Sei sulla pagina 1di 1

Grades Again

Problem:
At the end of the semester, you receive an email from your teacher. She wants to meet you to
discuss grades. For a moment you think she wants to admonish you for getting bad grades.
When you meet her, she explains that she has graded all the exams, and the grades are out of
100. However, the dean wants a number that is scaled down to 10. She wants you to write a
small program to scale down the grades and represent them out of 10 instead of 100.
In the exercise below, the grades will be given to you in an array of type double, called
'grades'. These are grades out of 100. You have to scale them down so that they are now
represented out of 10 and change the values in the array accordingly
Please note, in this exercise you do not have to explicitly print anything.You simply have to
change values in the array. We have already provided code that will print the array.

What we expect:
When you run the program, it will ask you to enter grades of the students. You can enter all
the grades in one line as a set of floating point numbers, separated with spaces, as shown in
the line below.
"60.5 70 87 90 45"
This line will be parsed by the code we have already provided, and the grades will be made
available to you in an array of type double, called 'grades'.
We expect you to change values in the array to [6.05, 7.0, 8.7, 9.0, 4.5]

Potrebbero piacerti anche