Initializacia

This commit is contained in:
Kozar 2024-10-02 17:38:24 +00:00
parent 43922459dc
commit b944c638ad

View File

@ -87,15 +87,15 @@ int main() {
} }
int found_count = 0; int found_count = 0;
if (found_count > 0) {
printf("\nVysledky vyhladavania:\n");
for (int i = 0; i < count; i++) { for (int i = 0; i < count; i++) {
if (contains_normalized(menu[i].name, search)) { 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); printf("%s\n%.2f\n", menu[i].name, menu[i].price);
found_count++; found_count++;
} }
} }
}
printf("Nacitanych %d poloziek.\n", count); printf("Nacitanych %d poloziek.\n", count);