mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-08-14 02:34:17 +02:00
Fix while loop iterator incorrect count
The while loop is repeated 100 times not 99 times. 0~99 inclusive.
This commit is contained in:
@@ -233,7 +233,7 @@ on a new line! ""Wow!"", the masses cried";
|
|||||||
int fooWhile = 0;
|
int fooWhile = 0;
|
||||||
while (fooWhile < 100)
|
while (fooWhile < 100)
|
||||||
{
|
{
|
||||||
//Iterated 99 times, fooWhile 0->99
|
//Iterated 100 times, fooWhile 0->99
|
||||||
fooWhile++;
|
fooWhile++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user