Lua
              
              
            
          
          print("*****************分支结构和循环的学习******************")
print("*****************if else语句******************")
--if 条件 then end
a=660
b=670
--单分支
if a<b then
	print(a)
end
--双分支
if a>b then
	print("满足条件")
else
	print("不满足条件")
end
--多分支
if a>b then
	print("满足条件")
elseif a==668 then --elseif必须要连着写不然会报错后面还要加then
	print("还差一点满足")
elseif a==666 then
	print("终于满足了")
else--最后一个else不用加then
	print("放弃了不找了")
end
print("*****************while do语句******************")
num=10
while num<20 do
	print(num)
	num=num+1
end
print("*****************do while语句******************")
num=1145;
repeat
	print(num)
	num=num+1
until num>1148--满足条件就退出
print("*****************for语句******************")
for i=8848,8850 do--默认递增+1,直到满足大于后面的那个数
	print(i)
end
for i=666,671,2 do--自定义增量就在后面加一个数
	print(i)
end
for i=671,666,-2 do--自定义增量就在后面加一个数,这个数可以是负数
	print(i)
end
print("*****************lua中没有switch语句******************")输出
