Tuesday, May 1, 2012

Loop

 local i = 1  
 while i < 10 do  
      print(i)  
      i = i + 1  
 end  
 local i = 1  
 repeat  
      print(i)  
      i = i + 1  
 until i >= 10  
 for i=1, 9, 1 do  
      print(i)  
 end  

No comments:

Post a Comment