Jumping Back and Forth 23
This commit is contained in:
parent
98e7f950cf
commit
8717d37445
13 changed files with 299 additions and 30 deletions
42
test/while.lox
Normal file
42
test/while.lox
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
|
||||
var x = 1;
|
||||
|
||||
while(x <= 2){
|
||||
print x;
|
||||
x = x + 1;
|
||||
}
|
||||
print "";
|
||||
|
||||
while(x > 0){
|
||||
print x;
|
||||
x = x - 1;
|
||||
}
|
||||
print "";
|
||||
|
||||
while(x < 2){
|
||||
print x;
|
||||
x = x + 1;
|
||||
}
|
||||
print "";
|
||||
|
||||
{
|
||||
var x = 1;
|
||||
|
||||
while(x <= 2){
|
||||
print x;
|
||||
x = x + 1;
|
||||
}
|
||||
print "";
|
||||
|
||||
while(x > 0){
|
||||
print x;
|
||||
x = x - 1;
|
||||
}
|
||||
print "";
|
||||
|
||||
while(x < 2){
|
||||
print x;
|
||||
x = x + 1;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue