Emess Snowball Master


Number of posts: 1615
8534
 | Subject: Lua Loops Sat Nov 27, 2010 11:13 am | |
| They're extremely simple, but very fun. | Code: | num = 1 while true do print(num) if num == 10000 then break end num = num + 1 end |
| Code: | num = 1 repeat print(num) num = num + 1 until num == 10000 |
| Code: | for i = 1, 10000 do print(i) i = i + 1 end |
|
|
StormWave Jet pack rider


Mood:  Number of posts: 4290
6918
 | Subject: Re: Lua Loops Sat Nov 27, 2010 11:46 am | |
| What are these supposed to do XD |
|
Emess Snowball Master


Number of posts: 1615
8534
 | Subject: Re: Lua Loops Sat Nov 27, 2010 11:48 am | |
| | GearWorks wrote: | | What are these supposed to do XD |
Print numbers until it reaches 10K.
Install the Lua command line, and give it a try. |
|
Frostypie901 Non-member


Mood:  Number of posts: 67
681
 | Subject: Re: Lua Loops Thu Jul 14, 2011 4:13 pm | |
| ok here ill try! num = 1 while true do print(num) if num == 10000 then break end num = num + 1 endnum = 1 repeat print(num) num = num + 1 until num == 10000for i = 1, 10000 do print(i) i = i + 1 end |
|
StevTheUnOriginal Waddler


Mood:  Number of posts: 451
1191
 | Subject: Re: Lua Loops Thu Jul 14, 2011 4:37 pm | |
| | Frostypie901 wrote: | ok here ill try! num = 1 while true do print(num) if num == 10000 then break end num = num + 1 endnum = 1 repeat print(num) num = num + 1 until num == 10000for i = 1, 10000 do print(i) i = i + 1 end |
Don't post in topics 30 days or older please. |
|