RosettaCodeData/Task/Arithmetic-Integer/Oberon/arithmetic-integer.oberon

13 lines
425 B
Plaintext

MODULE Arithmetic;
IMPORT In, Out;
VAR
x,y:INTEGER;
BEGIN
Out.String("Give two numbers: ");In.Int(x);In.Int(y);
Out.String("x + y >");Out.Int(x + y,6);Out.Ln;
Out.String("x - y >");Out.Int(x - y,6);Out.Ln;
Out.String("x * y >");Out.Int(x * y,6);Out.Ln;
Out.String("x / y >");Out.Int(x DIV y,6);Out.Ln;
Out.String("x MOD y >");Out.Int(x MOD y,6);Out.Ln;
END Arithmetic.