Answer to Question #280840 in C for ghost

Question #280840

write a c program which reads the marks of a student in physics,chemistry,and mathemaics,and stores them in integer variables p,c,m.The program should print (Eligible/Not Eligible) based on the following eligibility criteria for admission to a degree course:

Marks in Maths >=65

Marks in Phy >=55

Marks in Chem>=50

Total in all three subject>=190

or

Total in Math and Physics>=140


1
Expert's answer
2021-12-20T08:53:01-0500
#include <iostream>
using namespace std;


int main()
{
    int p,c,m;
    
    cout<<"Marks in Physics: ";
    cin>>p;
    
    cout<<"Marks in Maths: ";
    cin>>m;
    
    cout<<"Marks in Chemistry: ";
    cin>>c;
    
    if ((m >= 65 and p >= 55 and c >= 50 ) and ((p+c+m >= 190) or (m+p >= 140)))
    {
        cout<<"Eligible";
    }
    else
    {
        cout<<"Not Eligible";
    }
    
    
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS