-- Function to calculate the surface area of a box
function calculate_area(length, width, height)
local area = 2 * (length * width + length * height + width * height) -- Calculate the surface area
return area
end
-- Function to calculate the volume of a box
function calculate_volume(length, width, height)
local volume = length * width * height -- Calculate the volume
return volume
end
-- Main program
local length = 5 -- Define the length of the box
local width = 10 -- Define the width of the box
local height = 3 -- Define the height of the box
_Print_Console("Box with length " .. length .. ", width " .. width .. ", and height " .. height .. ":")
_Print_Console("Surface Area: " .. calculate_area(length, width, height)) -- Print the surface area
_Print_Console("Volume: " .. calculate_volume(length, width, height)) -- Print the volume