RosettaCodeData/Task/Exponentiation-order/Pluto/exponentiation-order.pluto

8 lines
206 B
Text
Raw Permalink Normal View History

2026-04-30 12:34:36 -04:00
local fmt = require "fmt"
local ops = { "5 ^ 3 ^ 2", "(5 ^ 3) ^ 2", "5 ^ (3 ^ 2)" }
local res = { 5 ^ 3 ^ 2, (5 ^ 3) ^ 2, 5 ^(3 ^ 2) }
for i = 1, #ops do
fmt.print("%-13s -> %.0f", ops[i], res[i])
end