1. Trainee Names
1) Saleh Mohammed Al Qahtany (438227450)
2) Basil Naji Al Hemedy (438227387)
Instructor Name
Ibraheem Al Adayni
2. C++ is a general purpose programming language that
supports various computer programming models. It was
created by Bjarne Stroustrup and, “Its main purpose was to
make writing good programs easier and more pleasant for
the individual programmer.
We will focus in this presentation on how to solve problem
in C++ by explain the logical sequence of steps that solves
the problem.
3. Steps of solving the
problem;
Analyze.
Flowchart.
Pseudocode.
Examples.
References.
4. First step of solving
the problem start
with…
Understand (define)
the problem and what
the solution must do.
Develop a logical
sequence of steps that
solves the problem.
5. Flowchart is a diagrammatic representation of
an algorithm. Flowchart is very helpful in writing
program and explaining program to others.
FunctionNameSymbol
An oval represents a
start or end point
Start/End
A line is a connector
that shows relationships
between the
representative shapes
Arrows
A parallelogram
represents input or
output
Input/output
A rectangle represents a
process
Process
A diamond indicates a
decision
Decision
6. Pseudocode is a list of steps written in English.
Like the instruction for a recipe. Must be in the right
sequence. Imagine saying “bake the cake” and then
“mix it up”
1. Start.
2. Enter the input.
3. Process.
4. Show the result.
5. Decision.
6. End.
7. In this example you will find the relationship between Flowchart & Pseudocode & C++ Code
Example of calculate the age:
Pseudocode
1- Start.
2- Enter the porn year.
3- Calculate the age.
4- Show the result.
5- End.
Flowchart
Start
Enter Your
Porn Year
Calculate
Show the
Result
End
8. Example of calculate the age by using Decision:
Pseudocode
1- Start.
2- Enter the porn year.
3- Calculate the age.
4- Show the result.
5- Decision if age >60 years print out old.
6- End.
Flowchart
Start
Enter Your
Porn Year
Calculate
Show the
Result
If
age>60
Yes
old
No
End