From e10023b3a47d3f8537c4366ffe61dced5d655a3f Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Mon, 5 Feb 2024 18:23:30 +0000 Subject: [PATCH] Added programmingMode.c file and moved functions from main_calculator.c in the programmingMode.c file --- src/main/c/main_taschenrechner.c | 19 ------------------- src/main/c/programmingMode.c | 23 +++++++++++++++++++++++ src/main/c/scientific.c | 10 ---------- 3 files changed, 23 insertions(+), 29 deletions(-) create mode 100644 src/main/c/programmingMode.c delete mode 100644 src/main/c/scientific.c diff --git a/src/main/c/main_taschenrechner.c b/src/main/c/main_taschenrechner.c index edbc325..4223bf5 100644 --- a/src/main/c/main_taschenrechner.c +++ b/src/main/c/main_taschenrechner.c @@ -148,25 +148,6 @@ void graphMode() { } } -// Programming mode - -void programmingMode() { - - int num1, num2, result; - char operator; - - printf("Enter first integer: "); - scanf("%d", &num1); - - printf("Enter operator (+, -, *, /): "); - scanf(" %c", &operator); - - printf("Enter second integer: "); - scanf("%d", &num2); - -} - - // change mode int mode(int userChoice){ diff --git a/src/main/c/programmingMode.c b/src/main/c/programmingMode.c new file mode 100644 index 0000000..e89a75c --- /dev/null +++ b/src/main/c/programmingMode.c @@ -0,0 +1,23 @@ +// programmingMode + +#include +#include + +#include "taschenrechner.h" + + +void programmingMode() { + + int num1, num2, result; + char operator; + + printf("Enter first integer: "); + scanf("%d", &num1); + + printf("Enter operator (+, -, *, /): "); + scanf(" %c", &operator); + + printf("Enter second integer: "); + scanf("%d", &num2); + +} diff --git a/src/main/c/scientific.c b/src/main/c/scientific.c deleted file mode 100644 index 0500106..0000000 --- a/src/main/c/scientific.c +++ /dev/null @@ -1,10 +0,0 @@ -// scientific.c -#include -#include -#include "taschenrechner.h" - - -double scientificMode() { - - return 0.0; -}