Initial commit from sysy-main
This commit is contained in:
18
testdata/functional/26_while_test1.sy
vendored
Executable file
18
testdata/functional/26_while_test1.sy
vendored
Executable file
@@ -0,0 +1,18 @@
|
||||
int doubleWhile() {
|
||||
int i;
|
||||
i = 5;
|
||||
int j;
|
||||
j = 7;
|
||||
while (i < 100) {
|
||||
i = i + 30;
|
||||
while(j < 100){
|
||||
j = j + 6;
|
||||
}
|
||||
j = j - 100;
|
||||
}
|
||||
return (j);
|
||||
}
|
||||
|
||||
int main() {
|
||||
return doubleWhile();
|
||||
}
|
||||
Reference in New Issue
Block a user