-- Homework 18, problem 3 -- solution.

local i = 1
local total = 0

while true do
    total = total + i
    if total > 100 then
        break
    end
    i = i + 1
end

print("Stopped at i = " .. i .. " with total = " .. total)
