Arithmetic/Integer: Difference between revisions

Content added Content deleted
No edit summary
(+Icon+Unicon)
Line 558: Line 558:
A to the power of B = 16E-4
A to the power of B = 16E-4
A to the power of B = 16E-4 </lang>
A to the power of B = 16E-4 </lang>

== Icon and Unicon ==
==={{header|Icon}}===

<lang Icon>procedure main()
writes("Input 1st integer a := ")
a := integer(read())
writes("Input 2nd integer b := ")
b := integer(read())

write(" a + b = ",a+b)
write(" a - b = ",a-b)
write(" a * b = ",a*b)
write(" a / b = ",a/b, " rounds toward 0")
write(" a % b = ",a%b, " remainder sign matches a")
write(" a ^ b = ",a^b)
end</lang>

==={{header|Unicon}}===
This Icon solution works in Unicon.


=={{header|J}}==
=={{header|J}}==