Data update
This commit is contained in:
parent
61b93a2cd1
commit
5af6d93694
858 changed files with 20572 additions and 2082 deletions
23
Task/Arithmetic-Integer/LDPL/arithmetic-integer.ldpl
Normal file
23
Task/Arithmetic-Integer/LDPL/arithmetic-integer.ldpl
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue