The type of the computed average
Because the sum of the grades is maintained as type double, the arithmetic will be performed as type double even though the number of grades is an integer.
Thus, the output shown in Figure 2 would include a fractional part, such as 98.25 for example, if there is a fractional part.
(There was no fractional part in the average for the values illustrated in Figure 2.)