Thursday, May 5, 2022

AVERAGE OF STUDENTS USING NEASTED IF #THEHACKERS@

 #include<iostream>

using namespace std;


int main()

{

    int m1, m2, m3, total;

    float avg;

    cout<<" Enter m1 :";

    cin>>m1;

    cout<<" Enter m2 :";

    cin>>m2;

    cout<<" Enter m3 :";

    cin>>m3;

    total=m1+m2+m3;

    avg=total/3.0;

    if(avg>=60)

    {

        cout<<" YOUR GARDE IS A,";

    }

    else

    {

        if(avg>=35&&avg<60)

        {

            cout<<" YOUR GARDE IS B.";

        }

        else

        {

            cout<<" YOUR GRADE IS C.";

        }

    }

    return 0;

    

    

}

No comments:

Post a Comment

CONSTRUCTURE IN PARENT CLASS

class Parent {     public Parent()     {         System.out.println("Parent Constrcutor");     }              } class Child extend...