From 6d4ec67bcbf4c7f7cc039f55cf774eea8d8e7bc3 Mon Sep 17 00:00:00 2001 From: Weber Date: Mon, 14 Oct 2024 12:16:31 +0000 Subject: [PATCH] test --- cv3/program.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cv3/program.c b/cv3/program.c index 7492a28..68444af 100644 --- a/cv3/program.c +++ b/cv3/program.c @@ -78,6 +78,7 @@ int main() { inicializuj(&kalkulacka); char vstup[100]; bool delenieNulou = false; + bool nejakeVlozenie = false; while (true) { fgets(vstup, sizeof(vstup), stdin); @@ -92,6 +93,7 @@ int main() { if (sscanf(vstup, "%f", &hodnota) == 1) { if (vloz(&kalkulacka, hodnota)) { zobraz_zasobnik(&kalkulacka); + nejakeVlozenie = true; } } else if (sscanf(vstup, "%c", &operacia) == 1) { switch (operacia) { @@ -125,7 +127,7 @@ int main() { } } - if (!delenieNulou) { + if (!nejakeVlozenie) { printf("no input\n"); }