25 lines
896 B
Plaintext
25 lines
896 B
Plaintext
To run:
|
|
Start up.
|
|
Sort three numbers.
|
|
Wait for the escape key.
|
|
Shut down.
|
|
|
|
To sort three numbers:
|
|
Put 77444 into an x number.
|
|
Put -12 into a y number.
|
|
Put 0 into a z number.
|
|
Write "===Before sorting===" on the console.
|
|
Write "x: " then the x on the console.
|
|
Write "y: " then the y on the console.
|
|
Write "z: " then the z on the console.
|
|
Sort the x and the y and the z.
|
|
Write "===After sorting===" on the console.
|
|
Write "x: " then the x on the console.
|
|
Write "y: " then the y on the console.
|
|
Write "z: " then the z on the console.
|
|
|
|
To sort a first number and a second number and a third number:
|
|
If the first number is greater than the second number, swap the first number with the second number.
|
|
If the second number is greater than the third number, swap the second number with the third number.
|
|
If the first number is greater than the second number, swap the first number with the second number.
|