Problem Solving Structures
Problem Solving Structures
STRUCTURES
EXAMPLE
START
DISPLAY ‘Please enter 2 numbers’
READ NUM1, NUM2
SUM = NUM1 + NUM2
PRINT ‘The sum is’, SUM
END
CONDITIONAL STATEMENTS
Answer
START
Display ‘Please enter your age’
Read age
IF age < 13 THEN
Print ‘CHILD’
Endif
END
IF-THEN-ELSE Statement
Write a pseudocode algorithm to show if Kay is a child
once she is under 13 years old, or if she is not a child it
would print a statement.
Answer
START
Display ‘Please enter the age of Kay’
Read age
IF age < 13 THEN
Print ”Kay is a child”
Else
Print ”Kay is not a child”
Endif
END