-- Homework 15, challenge -- solution.

io.write("Height in metres (e.g. 1.78): ")
local height = tonumber(io.read())
io.write("Weight in kg (e.g. 72.5):     ")
local weight = tonumber(io.read())

local bmi = weight / (height * height)
print(string.format("BMI: %.1f", bmi))
