Sha256: bd5f741bc8ae20af3b3dc8718107b94f101db1c1f9a0fcc5931dabcdef1b8773
Contents?: true
Size: 387 Bytes
Versions: 10
Compression:
Stored size: 387 Bytes
Contents
val a = Console.readInt val b = Console.readInt val sum = a + b //integer addition is discouraged in print statements due to confusion with String concatenation println("a + b = " + sum) println("a - b = " + (a - b)) println("a * b = " + (a * b)) println("quotient of a / b = " + (a / b)) // truncates towards 0 println("remainder of a / b = " + (a % b)) // same sign as first operand
Version data entries
10 entries across 7 versions & 1 rubygems