RosettaCodeData/Task/Arithmetic-Integer/Euphoria/arithmetic-integer.euphoria
Ingy döt Net 764da6cbbb CDE
2013-04-10 16:57:12 -07:00

13 lines
364 B
Text

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))