-- 1. if end
a=1
if a==1 then 
  print(a)
end

-- 2. if else end
b=1
if b < 10 then
  print('b<10 and b='..b)
else
  print('b>10 and b='..b)
end

-- 3. if elseif else end
score=64
if score>=0 and score<60 then
  print('不及格, score='..score)
elseif score>=60 and score<80 then
  print('成绩中等, score='..score)
elseif score>=80 and score<=100 then
  print('成绩优良, score='..score)
else 
  print('错误的分数!, score='..score)
end 


丰木
322 声望19 粉丝

遇见超乎想象的自己!