RevisionIOA Statements Nov 2, 2020
RevisionIOA Statements Nov 2, 2020
18 FPowell [email protected]
Operator Explanation
+ Addition
- Subtraction
Read Num1 (Line 1)
Read Num2 (Line 2)
* Multiplication
Print Sum (Line 4)
= Equal to
<> Not equal to
OUTPUT STATEMENT
The output statement is used to get information
> Greater than
to the programmer or computer user.
Explanation
Line 4 – This instruction will displaythe
Layout1 thecontents
> Less thanmessage “The sumis” as well as
Layout2 OPERATORS
USEDINPSEUDOCODEALGORITHMS
Print “Message”, Variable Name
or The following operators are usedwhendeveloping
pseudocode algorithms that require
Write “Message”, Variable Name
calculations and comparisons.
Practice Question
Write a pseudocode algorithm to read two numbers and find their sum. Print the
results.
Solution1
Explanation
Line 4 – This instruction will display the
contents stored in the variable Sum.
Solution2
19 FPowell [email protected]