From abff8966b5e033159cee940db55763d9d8c0370c Mon Sep 17 00:00:00 2001 From: amaury Date: Mon, 6 Mar 2023 11:37:16 +0100 Subject: [PATCH] nouveau fichier de comparaisons --- .../boolean_logic/new_comparisons.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 test_programs/riscv_instructions/boolean_logic/new_comparisons.c diff --git a/test_programs/riscv_instructions/boolean_logic/new_comparisons.c b/test_programs/riscv_instructions/boolean_logic/new_comparisons.c new file mode 100644 index 0000000..54bd275 --- /dev/null +++ b/test_programs/riscv_instructions/boolean_logic/new_comparisons.c @@ -0,0 +1,17 @@ +int main() { + int x = 0; + int y = 1; + while (x <= y) { + if (x > y) { + y += 1; + } + if (x == y) { + x += y; + } + if (x < y) { + x += 1; + } else { + return 0; + } + } +} \ No newline at end of file