-- localization
print("What is A?")
local A = io.read("*line")
print("What is B?")
local B = io.read("*line")
print("What is C?")
local C = io.read("*line")
print("")
-- Variable outputs
print("A = " .. A)
print("B = " .. B)
print("C = " .. C)
print("")
-- if statements (variables)
if A == 'X' or A == 'x' then
    local ans = math.sqrt((C^2) - (B^2))
    print("A = " .. ans)
elseif B == 'X' or B == 'x' then
    local ans = math.sqrt((C^2) - (A^2))
    print("B = " .. ans)
elseif C == 'X' or C == 'x' then
    local ans = math.sqrt((A^2) + (B^2))
    print("C = " .. ans)
else
    print("Please input proper value(s)")
end
-- Work question
--print("Do you want to see the work? 'Yes' or 'No'")
--local Ques = io.read("*line")
-- if statements (question)
--if Ques == 'Yes' or Ques == 'yes' then
    --..
--elseif Ques == 'No' or Ques == 'no' then
    --print()
    
    

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: