Arithmetic/Integer: Difference between revisions

No edit summary
Line 1,069:
Exponentiation is also a base arithmetic operation in Groovy, so:
a ** b = 5 ** 3 = 125</pre>
 
=={{header|Harbour}}==
<lang harbour>Function( a, b )
? "a+b", a + b
? "a-b", a - b
? "a*b", a * b
// The quotient isn't integer, so we use the Int() function, which truncates it downward.
? "a/b", Int( a / b )
// Remainder:
? "a%b", a % b
// Exponentiation is also a base arithmetic operation
? "a**b", a ** b
Return Nil</lang>
 
=={{header|Haskell}}==
Anonymous user