Edp101l Finalreviewer
Edp101l Finalreviewer
Edp101l Finalreviewer
Programming Language
(2) RAM- Random access memory/ main - A language used to write programs.
memory Types
- Hold both programs instruction and
data. (1) Low-level
- Volatile= erased when program - Used for communication with computer
terminates or computer is off hardware directly
(2) High level
Main memory organization - Closer to human language
Pseudocode
Flowchart
- is a graphical representation of an
algorithm. It is usually drawn using
certain special-purpose symbols
connected by arrows called flow lines.
Table 7 shows the basic flowchart
symbols with its equivalent meaning.
Terminal
Input/Output
Process
Initialization
Offpag onpa
econne gecon
ctor necto
r
Deci
sion
== Equal to
!= Not equal to
< Less than
<= Less than and equal
to
>
>=
! Not
&& And
|| Or
#include<iomanip>
#include<cmath>||<math.h>
pow (x, y) Pow (base, exponent) pow (4, 2)
log (x) Natural log of x log (5)
exp (x) Exponential value of x exp (5)
cos (x) Cosine of x cos (60)
sin (x) Sine of x Sin (60)
tan (x) Tan of x tan (60)
acos (x) Arccos of x acos (60)
asin (x) Arcsin of x asin (60)
atan (x) Archtan of x atan (60)
fabs (x) Abs value of x fabs (-10)
sqrt (x) Square root of x sqrt (10)
+ Addition X+y
- Subtraction X–y
* Multiplication X*y
/ Division X/y
% Modulus division X&y
One-way selection: if
If (expression)
Statement;
True=execute
False=does not execute, go next statement
if (condition1)
Statement/s;
else if (condition 2)
Statement/s;
else if (condition 3)
Statement/s;
else
switch (expression)
{
case value1;
statements1;
break;
case value2;
statements2;
break;
default:
statements;
}
= does not match any of the case, default
execute.
=if does not match any of the case, and no
default, the switch statements skipped.
=break, immediate exit from the switch
LOOPING STRUCTURE
- || iteration or repetition
- sequence of instructions that is
continually repeated until a certain
condition is satisfied.
Initialization;
while (condition)
{
statements;
updater;
}
Initialization;
do
{
statements;
updater;
} while (condition);
[]
ex: