무엇이 루아 코드에 문제가 있습니까?루아의 반복 루프까지 반복
local which
print("Type f to convert fahrenheit to celsius and c to convert celsius to fahrenheit")
which = io.read()
repeat
if which=="f" then
local c
local f
print("input your fahrenheit temperature")
f = tonumber(io.read())
c = (f-32)/1.8
print(c)
end
elseif which=="c" then
local ce
local fa
print("input your celsius temperature")
c = tonumber(io.read())
f = (c*1.8)+32
end
else do
print("Type f to convert fahrenhiet to celsius and c to convert celsius to fahrenheit")
until which=="f" or which=="c"
들여 쓰기가 일관성있는 들여 쓰기를 유지하면 반복 몸체 들여 쓰기가 가능합니다.이 유형의 오류가 많이 발생하면 도움이됩니다. – jpjacobs