In an exam, the performance analysis of students based on marks are as bellow: 80% and above: Excellent (60-79)%: Good (50-59)%: Average (40-49)%: Below Average Below 40%: Bad. Write a C++ program to show the performance of any student based on this system.

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";

}

Output: 

Enter the mark (Percentage): 83
Excellent
Process returned 0 (0x0)   execution time : 2.698 s
Press any key to continue.

أحدث أقدم