|
|
@ -36,6 +36,17 @@ const char* getFirstUnit(int input){ |
|
|
|
return "Kelvin"; |
|
|
|
return ""; |
|
|
|
} |
|
|
|
const char* getSecondUnit(int input){ |
|
|
|
if(input == 1 || input == 6) |
|
|
|
return "° Fahrenheit"; |
|
|
|
else if(input == 2 || input == 4) |
|
|
|
return " Kelvin"; |
|
|
|
else if(input == 3 || input == 5) |
|
|
|
return "° Celsius"; |
|
|
|
|
|
|
|
|
|
|
|
return ""; |
|
|
|
} |
|
|
|
|
|
|
|
int run_TemperaturRechner(){ |
|
|
|
float var1, var2; |
|
|
@ -71,7 +82,7 @@ int run_TemperaturRechner(){ |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
printf("\nErgebnis: %.2f\n", var2); |
|
|
|
printf(" = %.2f%s\n\n", var2, getSecondUnit(var3)); |
|
|
|
|
|
|
|
|
|
|
|
return 0; |
|
|
|