From cc11e6eccd60ea42b1141f358abb9c643a1e6dfb Mon Sep 17 00:00:00 2001 From: Enrico Schellenberger Date: Sat, 3 Feb 2024 17:45:29 +0100 Subject: [PATCH] changed the last else if in BasicMode.c to include the = char --- src/main/c/BasicMode.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/c/BasicMode.c b/src/main/c/BasicMode.c index f68a11a..cfb5ded 100644 --- a/src/main/c/BasicMode.c +++ b/src/main/c/BasicMode.c @@ -48,7 +48,12 @@ void BasicMode() { else if (i<=1 && operator[i] == '=') { //if there are less then 2 numbers in the array result = numbers[i]; //set result to the 0 digit } + + else if (operator[i] == '=') { //if char is = + printf("The result is: %d", result); //print out the result + i = 100; + break; + } i++; } - printf("The result is: %d", result); }