diff --git a/src/main/c/main_taschenrechner.c b/src/main/c/main_taschenrechner.c index 574ad40..60e57f1 100644 --- a/src/main/c/main_taschenrechner.c +++ b/src/main/c/main_taschenrechner.c @@ -22,7 +22,7 @@ int divide(int a, int b) { return a / b; } -// + // scientificmode int scientificMode(){ @@ -100,6 +100,23 @@ void programmingMode() { } +// Unit converter mode + +void unitConverterMode() { + int choice; + double value, result; + + printf("Unit Converter Mode:\n"); + printf("1. Meter to Kilometer\n"); + printf("2. Kilogram to Gram\n"); + printf("3. Celsius to Fahrenheit\n"); + printf("Enter your choice: "); + scanf("%d", &choice); + + printf("Enter the value to convert: "); + scanf("%lf", &value); + +} // change mode int mode(int userChoice){