22 lines
651 B
Plaintext
22 lines
651 B
Plaintext
To run:
|
|
Start up.
|
|
Read a number from the console.
|
|
Read another number from the console.
|
|
Output the sum of the number and the other number.
|
|
Wait for the escape key.
|
|
Shut down.
|
|
|
|
To output the sum of a number and another number:
|
|
If the number is not valid,
|
|
Write "Invalid input" to the console;
|
|
Exit.
|
|
If the other number is not valid,
|
|
Write "Invalid input" to the console;
|
|
Exit.
|
|
Write the number plus the other number then " is the sum." to the console.
|
|
|
|
To decide if a number is valid:
|
|
If the number is not greater than or equal to -1000, say no.
|
|
If the number is not less than or equal to 1000, say no.
|
|
Say yes.
|