24 lines
589 B
Plaintext
24 lines
589 B
Plaintext
data:
|
|
x is number
|
|
y is number
|
|
result is number
|
|
|
|
procedure:
|
|
display "Enter x: "
|
|
accept x
|
|
display "Enter y: "
|
|
accept y
|
|
add x and y in result
|
|
display "x + y = " result lf
|
|
subtract y from x in result
|
|
display "x - y = " result lf
|
|
multiply x by y in result
|
|
display "x * y = " result lf
|
|
divide x by y in result # There is no integer division but
|
|
floor result # floor rounds toward negative infinity
|
|
display "x / y = " result lf
|
|
modulo x by y in result
|
|
display "x % y = " result lf # Returns the sign of the 2nd argument
|
|
raise x to y in result
|
|
display "x ^ y = " result lf
|