diff --git a/src/main/c/main_taschenrechner.c b/src/main/c/main_taschenrechner.c index c64ab30..526d9e9 100644 --- a/src/main/c/main_taschenrechner.c +++ b/src/main/c/main_taschenrechner.c @@ -1,6 +1,7 @@ #include -// #include +#include #include +#include #include "taschenrechner.h" @@ -21,6 +22,48 @@ int divide(int a, int b) { return a / b; } +// scientificmode + +int scientificmode(){ + + double num, result; + + int choice; + + printf("Enter a number: "); + + scanf("%lf", &num); // scan the number from user + + printf("Scientific mode Options:\n"); + printf("1: Square root:\n"); + printf("2: Exponential:\n"); + printf("2: Logarithm:\n"); + printf("4: Trigonomertic"); + scanf("%d", &choice); // user choice + + switch(choice) { + + case 1: // Square root + break; + + case 2: // Exponential + break; + + case 3: // Logarithm + break; + + case 4: // Trigonomertic + break; + + default: printf("Invalid choice. Please try again.\n"); + + } + + return result; +} + + +// change mode int mode(int userChoice){ switch(userChoice) { @@ -51,7 +94,6 @@ int mode(int userChoice){ // display the mode options: - int displayMenu(){ printf("\nCalculator Modes: \n");