Sha256: 7c3333ecdc277684bbccd321829a1ea865607ffb44ae90e1bb6fa749bb5a4ed7

Contents?: true

Size: 338 Bytes

Versions: 10

Compression:

Stored size: 338 Bytes

Contents

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

Version data entries

10 entries across 7 versions & 1 rubygems

Version Path
zettacode-0.1.7 files.zettacode/arithmetic.integer/zkl.txt
zettacode-0.1.6 files.zettacode/arithmetic.integer/zkl.txt
zettacode-0.1.6 files.zettacode2/arithmetic.integer/zkl.txt
zettacode-0.1.5 files.zettacode/arithmetic.integer/zkl.txt
zettacode-0.1.5 files.zettacode2/arithmetic.integer/zkl.txt
zettacode-0.1.4 files.zettacode/arithmetic.integer/zkl.txt
zettacode-0.1.4 files.zettacode2/arithmetic.integer/zkl.txt
zettacode-0.1.3 files.zettacode/arithmetic.integer/zkl.txt
zettacode-0.1.2 files.zettacode/arithmetic.integer/zkl.txt
zettacode-0.1.1 zettacode.files/arithmetic.integer/zkl.txt