Answer to Question #273843 in C++ for harika

Question #273843

Write a C++ code that will conduct an interview for stewardess. If all the criteria as in the table below is fulfilled, the result will be “You Got The Job”. For unsuccessful candidates, the result will be “Try Again”. Unsuccessful candidates are those who did not fulfil the criteria below.

 

Age-Between 20 till 25

Height-Between 168 cm till 175 cm

Weight-Between 45 till 50 kg

English grade - A or B

 


1
Expert's answer
2021-12-01T00:52:19-0500


SOLUTION CODE


#include <iostream>


using namespace std;


int main()
{
    //prompt the interviewee to enter the required data
    int age;
    double height;
    double weight; 
    char english_grade;
    cout<<"\nEnter your age: ";
    cin>>age;
     cout<<"Enter your height in centimetres: ";
    cin>>height;
     cout<<"Enter your weight in kilograms: ";
    cin>>weight;
     cout<<"Enter your english grade: ";
    cin>>english_grade;
    
    if((age>= 20 && age<=25) && (height>= 168 && height<=175) && (weight>= 45 && weight<=50) && (english_grade=='A' || english_grade == 'B'))
    {
    	cout<<"\n\nYou Got The Job"<<endl;
	}
	else
	{
		cout<<"\n\nTry Again"<<endl;
	}
    
   
    return 0;
}


SAMPLE PROGRAM OUTPUT



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