From adfdc041e204e13c59c32d866fb2ee288b272c57 Mon Sep 17 00:00:00 2001 From: Rutherther Date: Sun, 29 Oct 2023 10:04:09 +0100 Subject: [PATCH] feat: add branches.c test --- programs/branches.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100755 programs/branches.c diff --git a/programs/branches.c b/programs/branches.c new file mode 100755 index 0000000..4d27404 --- /dev/null +++ b/programs/branches.c @@ -0,0 +1,43 @@ +void main() +{ + int a = 1; + int b = 5; + int c = 0; + + if (a < b) { + c = 1; + } else { + c = 2; + } + + if (a >= b) { + c = 1; + } else { + c = 2; + } + + if (a != b) { + c = 1; + } else { + c = 2; + } + + if (a == b) { + c = 1; + } else { + c = 2; + } + + if (a <= b) { + c = 1; + } else { + c = 2; + } + + if (a > b) { + c = 1; + } else { + c = 2; + } + +} -- 2.48.1