Code:
#include <iostream>
using namespace std;
int main(){
float mark;
cout << "Enter the mark (Percentage): ";
cin >> mark;
if (mark<40)
cout << "Bad";
else if (mark>=40 && mark<=49)
cout << "Below Average";
else if (mark>=50 && mark<=59)
cout << "Average";
else if (mark>=60 && mark<=79)
cout << "Good";
else
cout << "Excellent";
}
#include <iostream>
using namespace std;
int main(){
float mark;
cout << "Enter the mark (Percentage): ";
cin >> mark;
if (mark<40)
cout << "Bad";
else if (mark>=40 && mark<=49)
cout << "Below Average";
else if (mark>=50 && mark<=59)
cout << "Average";
else if (mark>=60 && mark<=79)
cout << "Good";
else
cout << "Excellent";
}
Output:
Enter the mark (Percentage): 83
Excellent
Process returned 0 (0x0) execution time : 2.698 s
Press any key to continue.