Arithmetic/Integer: Difference between revisions

adding Yorick
m (→‎{{header|XSLT}}: fixing placement of closing lang tag)
(adding Yorick)
Line 1,658:
<fo:block>a mod b = <xsl:value-of select="$a mod $b"/></fo:block>
</xsl:template></lang>
 
=={{header|Yorick}}==
<lang yorick>x = y = 0;
read, x, y;
write, "x + y =", x + y;
write, "x - y =", x - y;
write, "x * y =", x * y;
write, "x / y =", x / y; // rounds toward zero
write, "x % y =", x % y; // remainder; matches sign of first operand when operands' signs differ
write, "x ^ y =", x ^ y; // exponentiation</lang>
Anonymous user