-- Sample Lua script — samplefiles.com
local customers = {
  { id = 1, name = "Ada", balance = 12500 },
  { id = 2, name = "Grace", balance = 830.5 },
  { id = 3, name = "Linus", balance = 10000 },
}

local function is_vip(c) return c.balance >= 10000 end

local total = 0
for _, c in ipairs(customers) do
  print(string.format("%-6s %10.2f %s", c.name, c.balance, is_vip(c) and "VIP" or ""))
  total = total + c.balance
end
print(string.format("Total: %.2f", total))
