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