diff options
Diffstat (limited to 'tests/functional/31_while_if_test2.sy')
| -rw-r--r-- | tests/functional/31_while_if_test2.sy | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/functional/31_while_if_test2.sy b/tests/functional/31_while_if_test2.sy new file mode 100644 index 0000000..34c92da --- /dev/null +++ b/tests/functional/31_while_if_test2.sy @@ -0,0 +1,23 @@ +int ifWhile() { + int a; + a = 0; + int b; + b = 3; + if (a == 5) { + while(b == 2){ + b = b + 2; + } + b = b + 25; + } + else + while (a < 5) { + b = b * 2; + a = a + 1; + } + return (b); +} + + +int main(){ + return (ifWhile()); +} |
