LAB 2 LAB EXERCISES 1. Requirements for the post of Assistant Account Officer are: i) Minimum SPM with grade 2 ii) Age is more than 19 and less than 90 years old iii) Minimum of 1 year experience If the candidate fulfilled the requirement, display message “Qualified to interview”, if not, display “Not Qualified for interview”. Prepare pseudocode, flowchart and program code
flowchart
GET name GET grade GET age GET experience
Qualified for interview = ((grade <= 2) && (age > 19) && (age < 90) && (experience >=1))
No
SHOW “You are not qualified for interview”
COMPUTE ((grade <= 2) && (age > 19) && (age < 90) && (experience >=1))
Yes
SHOW “You are qualified for interview”
source code /* Name : xxx Date : 24 January 2008 Description : Lab 2 Made with Dev C++ 4.9.9.2 */ #include #include using namespace std; int main() {//open main string name; int grade, age, experience; //get input cout<<"\nPOST OF ASSISTANT ACCOUNT OFFICER"<<endl; cout<<"\nEnter Name cin>>name;
: ";
cout<<"\nEnter SPM Grade cin>>grade;
: ";
cout<<"\nEnter Age cin>>age;
: ";
cout<<"\nYear(s) of Experience : "; cin>>experience; //compute cout<<"\n++++++++++++++++++++++++++++++++"<<endl<<endl; if ((grade <= 2) && (age > 19) && (age < 90) && (experience >= 1)) cout<<"Congratulation "<
console application