Header Ad

C++ program to find out the grades of given marks

In this article, we will write a  C++ program to find out the grades of given marks. in this program user will enter the total marks and based on that program will print the grade of that student.

C++ program to find out the grades of given marks


C++ program to find out grades of marks.

#include<iostream>
#include<conio.h>

int main(void)
{

    int marks;

    std::cout<<"Enter the marks = ";
    std::cin>>marks;

    if(marks >= 85)
        std::cout<<"The Grader is A+";
    else if(marks >= 80)
        std::cout<<"The Grade is A";
    else if(marks >= 75)
        std::cout<<"The Grade is B+";
    else if(marks >= 70)
        std::cout<<"The Grade is B";
    else if(marks >= 60)
        std::cout<<"The Grade is C";
    else if(marks >=50)
        std::cout<<"The Grade is D";
    else
        std::cout<<"The Grade is F";

return 0;
}


Output

Enter the marks = 67
The Grade is C

Post a Comment

0 Comments