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.
#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";
}
}
Comments
Leave a comment