Answer to Question #308226 in C for ahmed

Question #308226

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.


1
Expert's answer
2022-03-13T06:03:13-0400
#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";
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS