From 1d31fd31acb575a78bc508b0acaa2eb3cb395aa9 Mon Sep 17 00:00:00 2001 From: Kevin Ludwig Date: Wed, 7 Feb 2024 21:49:07 +0100 Subject: [PATCH] =?UTF-8?q?abbruch=20bei=20zu=20kleiner/gro=C3=9Fer=20eing?= =?UTF-8?q?abe?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/temperatur.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/temperatur.c b/src/temperatur.c index 0ccf6fc..4d9e11a 100644 --- a/src/temperatur.c +++ b/src/temperatur.c @@ -57,6 +57,11 @@ int run_TemperaturRechner(){ printf("Waehlen Sie: \n<1> Celsius zu Fahrenheit\n<2> Celsius zu Kelvin\n<3> Fahrenheit zu Celsius\n<4> Fahrenheit zu Kelvin\n<5> Kelvin zu Celsius\n<6> Kelvin zu Fahrenheit\n"); scanf("%d", &var3); + if(var3 < 1 || var3 > 6){ + printf("Eingabe nicht zulaessig!"); + return 0; + } + printf("\nGeben Sie die Temperatur in %s ein: ", getFirstUnit(var3)); scanf("%f", &var1);