Saturday 11 January 2014

calculates grade of every student.

A C++ program which calculates grade of every student.

Range
Grade
>90
O
90<to>80
C
80<to>70
B
70<to>60
A
<60
E


#include<iostream.h>
#include<conio.h>
Void main()
{
           


            Cout<<”\n Enter the name of the student :”;
            Cin>>name;
            Cout<<”\n Enter English Mark : “;
            Cin>>m1;
            Cout<<”\n Enter Tamil Mark : “;
            Cin>>m2;
Cout<<”\n Enter Maths Mark : “;
            Cin>>m3;
Cout<<”\n Enter Science Mark : “;
            Cin>>m4;
Cout<<”\n Enter Social Science Mark : “;
            Cin>>m5;
            Tot=m1+m2+m3+m4+m5;
            Avg=tot/5;
            If(avg>90)
            {
                        Cout<<”\n Grade is O”;
            }
            If(avg<90||avg>80)
            {
                        Cout<<”\n Grade is C”;
            }
            If(avg<80||avg>70)
            {
                        Cout<<”\n Grade is B”;
            }
            If(avg<70||avg>60)
            {
                        Cout<<”\n Grade is A”;
            }
            If(avg<60)
            {
                        Cout<<”\n Grade is C”;
            }
            Getch();

}

No comments:

Post a Comment