Why is a type cast used in score = (int)round(base + scale*raw); ?
score = (int)round(base + scale*raw);
score is an int. Without the type cast the compiler will complain about possible loss of precision.
score
int
Above is a run of the program.
You have reached the end of the chapter.