#include <iostream>
#include <iomanip>
//it looks better if define outside main
#define ADULT 18 //Age (integer)
#define SMWD 1000.0 //Salary (float) Multiplier with degree
#define SMWO 600.0 //Salary (float) Multiplier without degree
usingnamespace std;
int main ()
{
int AGE;
char DEGS; //////////
system("CLS"); //Clear the Screen
cout << "Applicant Screen Test Program \n\n";
cout << "Welcome! \n\n";
cout << "What is your age in years? ";
cin >> AGE;
if (AGE >= ADULT)
{
cout <<"Do you have a college degree (Y/N)? ";
cin >> DEGS;
if (DEGS == 'Y' || DEGS=='y') //////////
{ cout << "Congratulations! You qualify for the job!\n";
cout << "Your calculated annual salary is: $" << setprecision (2) << fixed << AGE * SMWD << endl;
cout << "Please fill out an application at the front desk.";
}
else
{ cout << "Congratulations! You qualify for the job!\n";
cout << "Your calculated annual salary is: $" << setprecision (2) << fixed << AGE * SMWO << endl;
cout << "Please fill out an application at the front desk.";
}
}
else
{ cout << "We're sorry, you do not qualify for the job. \n";
cout << "You must be " << ADULT << " or older.\n";
cout << "Please reapply when you're old enough, in " << ADULT-AGE << endl; cout << "years.\n";
cout << "Thank you for your interest!";
}
return (0);
}