diff --git a/src/main/c/main_taschenrechner.c b/src/main/c/main_taschenrechner.c index d4549dc..c64ab30 100644 --- a/src/main/c/main_taschenrechner.c +++ b/src/main/c/main_taschenrechner.c @@ -6,7 +6,7 @@ int add(int a, int b) { - return a+b; + return a + b; } int minus (int a, int b){ @@ -47,4 +47,20 @@ int mode(int userChoice){ } +} + + +// display the mode options: + +int displayMenu(){ + + printf("\nCalculator Modes: \n"); + printf("\n1: Basic Mode\n"); + printf("\n2: Scientific Mode (Trigonomertic functions, Logarithm and exponential functions.)\n"); + printf("\n3: Graph Mode (Draw and visualize functions.)\n"); + printf("\n4: Programming Mode (Binary , octal and hexadecimal )\n"); + printf("\n5: Unit converter Mode (length, weight volume etc.)\n"); + printf("\n0: Exit calculator\n"); + + return 1; // return 1 to check if the function works } \ No newline at end of file diff --git a/src/main/c/taschenrechner.h b/src/main/c/taschenrechner.h index d410b22..5bbfe6b 100644 --- a/src/main/c/taschenrechner.h +++ b/src/main/c/taschenrechner.h @@ -11,4 +11,6 @@ int divide(int a, int b); int mode(int userChoice); +int displayMenu(); + #endif // TASCHENRECHNER_H