From b944c638ad18aec1b8ee52ce53610e53ed487525 Mon Sep 17 00:00:00 2001 From: Kozar Date: Wed, 2 Oct 2024 17:38:24 +0000 Subject: [PATCH] Initializacia --- cv1/program.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cv1/program.c b/cv1/program.c index b45f7ef..59381f4 100644 --- a/cv1/program.c +++ b/cv1/program.c @@ -87,13 +87,13 @@ int main() { } int found_count = 0; - if (found_count > 0) { - printf("\nVysledky vyhladavania:\n"); - for (int i = 0; i < count; i++) { - if (contains_normalized(menu[i].name, search)) { - printf("%s\n%.2f\n", menu[i].name, menu[i].price); - found_count++; + for (int i = 0; i < count; i++) { + if (contains_normalized(menu[i].name, search)) { + if (found_count == 0) { + printf("\nVysledky vyhladavania:\n"); } + printf("%s\n%.2f\n", menu[i].name, menu[i].price); + found_count++; } }