Arithmetic/Integer: Difference between revisions
Content added Content deleted
(→{{header|Tcl}}: Minor revisions) |
(→{{header|AWK}}: amigae) |
||
Line 47: | Line 47: | ||
remainder := quotient /:= 113; |
remainder := quotient /:= 113; |
||
Giving a quotient of 3, and a remainder of 16. |
Giving a quotient of 3, and a remainder of 16. |
||
=={{header|AmigaE}}== |
|||
<lang amigae>PROC main() |
|||
DEF a, b, t |
|||
WriteF('A = ') |
|||
ReadStr(stdin, t) |
|||
a := Val(t) |
|||
WriteF('B = ') |
|||
ReadStr(stdin, t) |
|||
b := Val(t) |
|||
WriteF('A+B=\d\nA-B=\d\n', a+b, a-b) |
|||
WriteF('A*B=\d\nA/B=\d\n', a*b, a/b) |
|||
/* * and / are 16 bit ops; Mul and Div are 32bit ops */ |
|||
WriteF('A*B=\d\nA/B=\d\n', Mul(a,b), Div(a,b)) |
|||
WriteF('A mod B =\d\n', Mod(a,b)) |
|||
ENDPROC</lang> |
|||
=={{header|AWK}}== |
=={{header|AWK}}== |