1234567891011121314151617
enum Grade{Excellent, Good, Satisfactory, Pass, Fail}; //... // Grade tier{}; //... else if (result >= 60 && result < 80) { tier = Satisfactory;//for example } //... switch (tier){ //... case (Satisfactory): std::cout << "Satisfactory \n"; break; //... }