September 2017 Update

This commit is contained in:
Ingy döt Net 2017-09-23 10:01:46 +02:00
parent bba7bfd280
commit ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions

View file

@ -1,17 +1,14 @@
#define system.
#define system'math.
#define extensions.
import system'math.
import extensions.
// --- Program ---
#symbol program =
program =
[
#var a := console readLine:(Integer new).
#var b := console readLine:(Integer new).
var a := console readLineTo(Integer new).
var b := console readLineTo(Integer new).
console writeLine:a:" + ": b:" = ":(a + b).
console writeLine:a:" - ": b:" = ":(a - b).
console writeLine:a:" * ": b:" = ":(a * b).
console writeLine:a:" / ": b:" = ":(a / b). // truncates towards 0
console writeLine:a:" % ":b:" = ":(a mod:b). // matches sign of first operand
console printLine(a," + ",b," = ",a + b).
console printLine(a," - ",b," = ",a - b).
console printLine(a," * ",b," = ",a * b).
console printLine(a," / ",b," = ",a / b). // truncates towards 0
console printLine(a," % ",b," = ",a mod:b). // matches sign of first operand
].