fixed bug and added a little documentation
This commit is contained in:
+15
-14
@@ -1,25 +1,26 @@
|
||||
|
||||
p = true;
|
||||
# ------------------------------------- #
|
||||
# -- While loop ----------------------- #
|
||||
|
||||
while p:
|
||||
i = 0;
|
||||
|
||||
while i < 3:
|
||||
{
|
||||
print('Hello!\n');
|
||||
p = false;
|
||||
print('Hello from the while loop!\n');
|
||||
i = i + 1;
|
||||
}
|
||||
|
||||
# ------------------------------------- #
|
||||
# -- Do-Wile loop --------------------- #
|
||||
|
||||
i = 0;
|
||||
|
||||
do
|
||||
{
|
||||
print('Hello 2!\n');
|
||||
}
|
||||
while false;
|
||||
|
||||
# ------------------------------------- #
|
||||
|
||||
i = 0;
|
||||
while i < 10:
|
||||
{
|
||||
print('i = ', i+1, '\n');
|
||||
print('Hello from the do-while loop!\n');
|
||||
i = i + 1;
|
||||
}
|
||||
while i < 3;
|
||||
|
||||
# ------------------------------------- #
|
||||
# ------------------------------------- #
|
||||
|
||||
Reference in New Issue
Block a user