Beware of the dangling else
if (average >= 60.0)         // Incorrect
   if (average < 70.0)
      cout << “Passing but marginal”;
else
   cout << “Failing”;