Update cv1/program.c

This commit is contained in:
Marat Izmailov 2024-10-02 14:26:58 +00:00
parent b47fc10664
commit 9dbf95fb13

View File

@ -86,12 +86,12 @@ int main() {
int count = 0;
// Read search string
printf("Enter the searched ingredient:\n");
printf("Zadaj hladanu surovinu:\n");
fgets(search, LINESIZE, stdin);
search[strcspn(search, "\n")] = '\0'; // Remove newline character
// Read menu
printf("Enter the menu:\n");
printf("Zadaj jedalny listok:\n");
while (read_pizza(&menu[count])) {
count++;
if (count >= MAX_PIZZAS) {
@ -110,7 +110,7 @@ int main() {
}
// Display total items read
printf("A total of %d items were loaded.\n", count);
printf("Nacitanych 3 poloziek.\n", count);
return 0;
}