Answer to Question #9966 in C++ for Mohammed Faisal

Question #9966
Write a program using pseudocode and C++ to let a user to accept qualification & number of employees experience depending with a following:
Qualification is Bachelors and experience more than or equal to 2 then print Lecture
Qualification is Master and experience more than 6 then print Assoc Prof
Qualification is PHD and experience more than 10 then print Prof
If not, it will print Invalid Data.
1
Expert's answer
2012-11-12T07:12:57-0500
#include <iostream>
#include <string>
using namespace std;
int main ()
{
string qualification;
int exp;
cout << "Enter your qualification: " << endl;
cin >> qualification;
cout << "Enter your experience: " << endl;
cin >> exp;

if (qualification == "Bachelors" & exp >=2) {
& cout << "Lecture" << endl;
}
else if (qualification == "Master" & exp > 6) {
& cout << "Assoc" << endl;
}
else if (qualification == "Prof" & exp > 10) {
& cout << "PHD" << endl;
}
else cout << "Invalid Data." << endl;
system("pause");
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
APPROVED BY CLIENTS