fork download
  1. procedure main()
  2. write("3 * 4 = ", "*"(3, 4))
  3. write("- 127 = ", "-"(127))
  4.  
  5. a := 42
  6. b := 73
  7. prefix("-", a)
  8. infix(![a, b], !["+", "-", "*", "/", "%"], ![a, b])
  9. end
  10.  
  11. procedure infix(s1, opr, s2)
  12. write(image(s1), " ", opr," ", image(s2), " = ", image(opr(s1, s2)))
  13. end
  14.  
  15. procedure prefix(opr, s1)
  16. write(opr," ", image(s1), " = ", image(opr(s1)))
  17. end
Success #stdin #stdout 0.01s 5320KB
stdin
Standard input is empty
stdout
3 * 4 = 12
- 127 = -127
- 42 = -42
42 + 42 = 84
42 + 73 = 115
42 - 42 = 0
42 - 73 = -31
42 * 42 = 1764
42 * 73 = 3066
42 / 42 = 1
42 / 73 = 0
42 % 42 = 0
42 % 73 = 42
73 + 42 = 115
73 + 73 = 146
73 - 42 = 31
73 - 73 = 0
73 * 42 = 3066
73 * 73 = 5329
73 / 42 = 1
73 / 73 = 1
73 % 42 = 31
73 % 73 = 0