RosettaCodeData/Task/Integer-comparison/AppleScript/integer-comparison-1.applescript
Ingy döt Net db842d013d A-M baby
2013-04-10 21:29:02 -07:00

12 lines
432 B
AppleScript

set n1 to text returned of (display dialog "Enter the first number:" default answer "") as integer
set n2 to text returned of (display dialog "Enter the second number:" default answer "") as integer
set msg to {n1}
if n1 < n2 then
set end of msg to " is less than "
else if n1 = n2 then
set end of msg to " is equal to "
else if n1 > n2 then
set end of msg to " is greater than "
end if
set end of msg to n2
return msg as string