RosettaCodeData/Task/Integer-comparison/EMal/integer-comparison.emal

17 lines
432 B
Text
Raw Permalink Normal View History

2026-04-30 12:34:36 -04:00
fun main ← int by List args
2023-07-01 11:58:00 -04:00
int a, b
if args.length > 1
2026-04-30 12:34:36 -04:00
a ← int!args[0]
b ← int!args[1]
2023-07-01 11:58:00 -04:00
else
2026-04-30 12:34:36 -04:00
a ← ask(int, "Enter the first integer ")
b ← ask(int, "Enter the second integer ")
2023-07-01 11:58:00 -04:00
end
2026-04-30 12:34:36 -04:00
writeLine("[ a ◇ b is " + (a ◇ b) + " ]")
2023-07-01 11:58:00 -04:00
if a < b do writeLine(a + " < " + b) end
2026-04-30 12:34:36 -04:00
if a æ b do writeLine(a + " æ " + b) end
2023-07-01 11:58:00 -04:00
if a > b do writeLine(a + " > " + b) end
return 0
end
exit main(Runtime.args)