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

10 lines
271 B
Text

include c:\cxpl\codes;
int A, B;
[A:= IntIn(0);
B:= IntIn(0);
IntOut(0, A+B); CrLf(0);
IntOut(0, A-B); CrLf(0);
IntOut(0, A*B); CrLf(0);
IntOut(0, A/B); CrLf(0); \truncates toward zero
IntOut(0, rem(0)); CrLf(0); \remainder's sign matches first operand (A)
]