Answer to Question #295260 in C++ for Sharp

Question #295260

A company hire network administrators in the following cases:


• If the candidate is Cisco certified.

• If the candidate’s highest degree is networks, age is below 30.

• If the candidate has 3 years of experience



In all other cases the candidate is not hired. If the cisco certificate status, highest degree and experience are the inputs, write a program to determine whether the candidate will get hired or not.


1
Expert's answer
2022-02-08T11:42:24-0500
#include <iostream>
#include <string>
using namespace std;


int main() {
    char ans;
    bool cisco;
    cout << "Do you have Cisco certificate? (y/N): ";
    ans = cin.get();
    cisco = ans == 'Y' || ans =='y';


    string degree;
    int age;
    cout << "Enter your highest degree: ";
    cin >> degree;
    cout << "Enter you age: ";
    cin >> age;


    int experience;
    cout << "Enter your experience: ";
    cin >> experience;


    bool hired = cisco || (degree == "networks" && age < 30) ||
                 experience >= 3;
    
    if (hired) {
        cout << "Congratulations, you are hired";
    }
    else {
        cout << "Sorry, but you don't satisfy our requirements";
    }
}

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