diff options
| author | Elizabeth Alexander Hunt <me@liz.coffee> | 2026-07-02 11:55:17 -0700 |
|---|---|---|
| committer | Elizabeth Alexander Hunt <me@liz.coffee> | 2026-07-02 11:55:17 -0700 |
| commit | 6bf4b90c90f15f4ab60833bddf5b5756d1a6b1f6 (patch) | |
| tree | ed97e39ec77c5231ffd2c394493e68d00ddac5a4 /Homework/cs5300/compiler/p5-compiler/data/test9.c | |
| download | misc-undergrad-6bf4b90c90f15f4ab60833bddf5b5756d1a6b1f6.tar.gz misc-undergrad-6bf4b90c90f15f4ab60833bddf5b5756d1a6b1f6.zip | |
Diffstat (limited to 'Homework/cs5300/compiler/p5-compiler/data/test9.c')
| -rw-r--r-- | Homework/cs5300/compiler/p5-compiler/data/test9.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Homework/cs5300/compiler/p5-compiler/data/test9.c b/Homework/cs5300/compiler/p5-compiler/data/test9.c new file mode 100644 index 0000000..1aacb59 --- /dev/null +++ b/Homework/cs5300/compiler/p5-compiler/data/test9.c @@ -0,0 +1,27 @@ +void main() { + int a; + a = 3; + println("This program prints [1..5] correct."); + if (a < 4) { + println("1 correct"); + } + if (a > 4) { + println("2 not correct"); + } + if (a > 4) { + println("2 not correct"); + } else { + println("2 correct"); + } + if (a <= 3) { + println("3 correct"); + } + if (a == 3) { + println("4 correct"); + } + if (a >= 4) { + println("5 not correct"); + } else { + println("5 correct"); + } +} |
