RosettaCodeData/Task/Arithmetic-Integer/Bc/arithmetic-integer.bc
2023-07-01 13:44:08 -04:00

8 lines
178 B
Text

define f(a, b) {
"add: "; a + b
"sub: "; a - b
"mul: "; a * b
"div: "; a / b /* truncates toward zero */
"mod: "; a % b /* same sign as first operand */
"pow: "; a ^ b
}