From 4022e5c95210631e4aceb08eaf9d9071aa5aefc4 Mon Sep 17 00:00:00 2001 From: Richard Qin Date: Tue, 15 Sep 2026 08:16:43 +0800 Subject: Set up a git repo --- tests/functional/28_while_test2.sy | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 tests/functional/28_while_test2.sy (limited to 'tests/functional/28_while_test2.sy') diff --git a/tests/functional/28_while_test2.sy b/tests/functional/28_while_test2.sy new file mode 100644 index 0000000..d1fad82 --- /dev/null +++ b/tests/functional/28_while_test2.sy @@ -0,0 +1,31 @@ +int FourWhile() { + int a; + a = 5; + int b; + int c; + b = 6; + c = 7; + int d; + d = 10; + while (a < 20) { + a = a + 3; + while(b < 10){ + b = b + 1; + while(c == 7){ + c = c - 1; + while(d < 20){ + d = d + 3; + } + d = d - 1; + } + c = c + 1; + } + b = b - 2; + } + + return (a + (b + d) + c); +} + +int main() { + return FourWhile(); +} -- cgit v1.2.3