1. The student’s work: Yunis Banafi
The teacher’s name: Ibrahim Aledane
College's name: CTE
2. Introduction of “If statement”
There are six parts:
• Frist part; the Definition of IF STATEMENT.
• Second part; Basic If Statement Syntax.
• Third part; Operations for making condition.
• Fourth part; Pseudocode
• Fifth part; Flowchart
• Sixth part; Executing the program
3. First part; the Definition of IF
STATEMENT
• "If statement“ It is a program uses
to compare the input data with a condition; to
decide what to do if the input data matches
the condition or not.
4. Second part; Basic If Statement Syntax
1- “IF” uses with first condition that evaluates to
true.
2- “Else IF” use with second condition and more
that evaluates to true.
3- “Else” come after “IF” or “Else if” it use
without condition and it evaluates to false.
5. Third part; Operations for making
condition
• > greater than 5 > 4 is TRUE
• < less than 4 < 5 is TRUE
• >= greater than or equal 4 >= 4 is TRUE
• <= less than or equal 3 <= 4 is TRUE
• == equal to 5 == 5 is TRUE
• != not equal to 5 != 4 is TRUE
6. Fourth Part; Pseudocode
1- Start.
2- Enter the age.
3- calculate the age.
4- if age>50 print you are not acceptable to register
for the job.
5- else if age>19 print you are acceptable to register
for the job.
6- else print you are too young to register for the
job.
7- End.
9. Last part; Executing the program
#include <iostream>
using namespace std;
int main()
{
cout<<"Plese Entr Your Age?"<<endl;
int age;
cin>> age;
if(age>=50){
cout<<"Your age is "<< age<<" ;it is not acceptable to register for the job."<<endl;
}
else if (age>=19){
cout<<" Your age is "<< age <<" ;it is acceptable to register for the job."<<endl;
}
else{
cout<<" Your age is "<<age<< " ;you still too young to register for the job."<<endl;
}
cout<< "Thank You!";
return 0;
}
10. The Conclusion
I explained to you:-
• the Definition of IF STATEMENT.
• Basic If Statement Syntax.
• Operations for making condition.
• Pseudocode
• Flowchart
• Executing the program