Arithmetic/Integer: Difference between revisions

Content added Content deleted
No edit summary
Line 790: Line 790:
=={{header|Arturo}}==
=={{header|Arturo}}==


<lang arturo>print "give me the first number : ", a: toNumber|strip|input ~
<lang rebol>a: to :integer input "give me the first number : "
print "give me the second number : ", b: toNumber|strip|input ~
b: to :integer input "give me the second number : "


print a + " + " + b + " = " + (a+b)
print [a "+" b "=" a+b]
print a + " - " + b + " = " + (a-b)
print [a "-" b "=" a-b]
print a + " * " + b + " = " + (a*b)
print [a "*" b "=" a*b]
print a + " / " + b + " = " + (a/b)
print [a "/" b "=" a/b]
print a + " % " + b + " = " + (a%b)
print [a "%" b "=" a%b]
print a + " ^ " + b + " = " + (a^b)</lang>
print [a "^" b "=" a^b]</lang>


{{out}}
{{out}}


<pre>give me the first number :
<pre>give me the first number : 33
give me the second number : 6
33
give me the second number :
6
33 + 6 = 39
33 + 6 = 39
33 - 6 = 27
33 - 6 = 27