From 1b98800df7ab1fd922ebcc19409153e328bc7274 Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Thu, 1 Feb 2024 21:15:38 +0000 Subject: [PATCH] Added Unit Converter mode without functionality --- src/main/c/main_taschenrechner.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) 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){