September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
7
Task/Arithmetic-Integer/Zkl/arithmetic-integer.zkl
Normal file
7
Task/Arithmetic-Integer/Zkl/arithmetic-integer.zkl
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
x,y:=ask("Two ints: ").split(" ").apply("toInt");
|
||||
println("x+y = ",x + y);
|
||||
println("x-y = ",x - y);
|
||||
println("x*y = ",x * y);
|
||||
println("x/y = ",x / y); // rounds toward zero
|
||||
println("x%y = ",x % y); // remainder; matches sign of first operand when operands' signs differ
|
||||
println("x.divr(y) = ",x.divr(y)); // (x/y,remainder); sign as above
|
||||
Loading…
Add table
Add a link
Reference in a new issue