RosettaCodeData/Task/Arithmetic-Integer/Euphoria/arithmetic-integer.euphoria

14 lines
364 B
Plaintext

include get.e
integer a,b
a = floor(prompt_number("a = ",{}))
b = floor(prompt_number("b = ",{}))
printf(1,"a + b = %d\n", a+b)
printf(1,"a - b = %d\n", a-b)
printf(1,"a * b = %d\n", a*b)
printf(1,"a / b = %g\n", a/b) -- does not truncate
printf(1,"remainder(a,b) = %d\n", remainder(a,b)) -- same sign as first operand
printf(1,"power(a,b) = %g\n", power(a,b))