September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
|
|
@ -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
|
||||
].
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue