RosettaCodeData/Task/Arithmetic-Integer/Yorick/arithmetic-integer.yorick
Ingy döt Net d066446780 langs a-z
2013-04-10 22:43:41 -07:00

8 lines
285 B
Text

x = y = 0;
read, x, y;
write, "x + y =", x + y;
write, "x - y =", x - y;
write, "x * y =", x * y;
write, "x / y =", x / y; // rounds toward zero
write, "x % y =", x % y; // remainder; matches sign of first operand when operands' signs differ
write, "x ^ y =", x ^ y; // exponentiation