Answer to Question #174162 in C++ for Harini.M

Question #174162

The Admission to a professional course is done using the following conditions.

a) Marks in Maths> =60

b) Marks in Physics >=50

c) Marks in chemistry >=40

d) Total in all the three subjects >=200 (or) Total in Maths and Physics >=150

Given the marks of three subjects, write a C++ program to process the applications to list the eligible candidates. 


1
Expert's answer
2021-03-22T03:13:45-0400
//C++ program to determine if student is eligible for admission for a professional course given marks of 3 subjects
#include <iostream>


using namespace std;


int main()
{
    //Marks variables
    double maths, physics, chemistry;


    //Prompt user for input of the marks
    cout<<"Enter Mathematics score: ";
    cin>>maths;
    cout<<endl;
    cout<<"Enter Chemistry score: ";
    cin>>chemistry;
    cout<<endl;
    cout<<"Enter Physicss score: ";
    cin>>physics;
    cout<<endl;


    if((maths + chemistry + physics) >= 200 | (maths + physics) >= 150)
    {
        cout<<"The student is eligible for admission"<<endl;
    }
    else
    {
        cout<<"The student is NOT eligible for admission"<<endl;
    }
    return 0;
}

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