Sha256: b9adaeeb1a8414934d180cf28c9a7afa774f9332fcbfaefbf05d38b83721349b
Contents?: true
Size: 447 Bytes
Versions: 10
Compression:
Stored size: 447 Bytes
Contents
# Lines which do not have two integers are skipped: def arithmetic: split(" ") | select(length > 0) | map(tonumber) | if length > 1 then .[0] as $a | .[1] as $b | "For a = \($a) and b = \($b):\n" + "a + b = \($a + $b)\n" + "a - b = \($a - $b)\n" + "a * b = \($a * $b)\n" + "a/b|floor = \($a / $b | floor)\n" + "a % b = \($a % $b)\n" + "a | exp = \($a | exp)\n" else empty end ; arithmetic
Version data entries
10 entries across 7 versions & 1 rubygems