Jump to content

Arithmetic/Integer: Difference between revisions

(→‎{{header|Tcl}}: Minor revisions)
Line 47:
remainder := quotient /:= 113;
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}}==
Cookies help us deliver our services. By using our services, you agree to our use of cookies.