Pseudo-code coding: Exercise #12 → Edition
Statement #12: The program must read numbers until it finds a number previously requested by the user, provided that this number is equal to the sum of the last 2 numbers read. Example: stop number = 12 and numbers just before = 8 and 4 or 6 and 6 or 7, 0, 12 and 12.
Compose and insert the variables you need

DASHBOARD

SHOE

Elementary instructions

Constants

True
False

Mathematical operators

Boolean operators

AND
OR
NOT

Comparators and parentheses

(
)

Control structures

IF
THEN
ELSE
END IF
REPEAT
UNTIL
WHILE
DO
END WHILE
FOR
DO
END FOR



Pseudo-code coding: Exercise #12 → Execution
Statement #12: The program must read numbers until it finds a number previously requested by the user, provided that this number is equal to the sum of the last 2 numbers read. Example: stop number = 12 and numbers just before = 8 and 4 or 6 and 6 or 7, 0, 12 and 12.
  Workspace →

Dashboard

Test result...

Test result...


© Rupert Meurice de Dormale 2024 (update of the 1995 version)

All rights reserved. Copying in whole or in part prohibited without written permission of the author.

adresse