HWs / total
(static_cast<double>(HWs) / total)
12
for (int i = 0; i < NUM_GRADES; ++i) total += grade[i] / 100.0 * weight[i];