Arithmetic/Integer: Difference between revisions
Content added Content deleted
m (→{{header|COBOL}}: Changed 'operand' to 'argument'.) |
No edit summary |
||
Line 1,635: | Line 1,635: | ||
FunctionEnd</lang> |
FunctionEnd</lang> |
||
=={{header|Oberon-2}}== |
|||
Oxford Oberon-2 |
|||
<lang oberon2> |
|||
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. |
|||
</lang> |
|||
Output: |
|||
<pre> |
|||
Give two numbers: 12 23 |
|||
x + y > 35 |
|||
x - y > -11 |
|||
x * y > 276 |
|||
x / y > 0 |
|||
x MOD y > 12 |
|||
</pre> |
|||
=={{header|Objeck}}== |
=={{header|Objeck}}== |
||
<lang objeck>bundle Default { |
<lang objeck>bundle Default { |