Sha256: 708961443f5bff859a3882f685b09617f8092493ff170bd9c42facb01b304a5f
Contents?: true
Size: 669 Bytes
Versions: 10
Compression:
Stored size: 669 Bytes
Contents
set i1 to (text returned of (display dialog "Enter an integer value" default answer "")) as integer set i2 to (text returned of (display dialog "Enter another integer value" default answer "")) as integer set sum to i1 + i2 set diff to i1 - i2 set prod to i1 * i2 set quot to i1 div i2 -- Rounds towards zero. set remainder to i1 mod i2 -- The result's sign matches the dividend's. set exp to i1 ^ i2 -- The result's always a real. return {|integers|:{i1, i2}, difference:diff, product:prod, quotient:quot, remainder:remainder, exponientiation:exp} {{output}} {|integers|:{-57, 2}, difference:-59, product:-114, quotient:-28, remainder:-1, exponientiation:3249.0}
Version data entries
10 entries across 7 versions & 1 rubygems