Write a program that reads a student grade percentage and prints "Excellent" if his grade is greater than or equal 85, "Very Good" for 75 or greater; "Good" for 65, "Pass" for 50, "Fail" for less than 50.
#include <iostream>
using namespace std;
int main()
{
int score;
cin >> score;
if (score >= 85)
{
cout << "Excellent";
}
else if (score >= 75)
{
cout << "Very Good";
}
else if (score >= 65)
{
cout << "Good";
}
else if (score >= 50)
{
cout << "Pass";
}
else cout << "Fail";
}
Comments
Leave a comment