Обновить cv1/program.c

This commit is contained in:
Yevhen Kozirovskyi 2024-10-02 16:51:23 +00:00
parent b2d1c23953
commit 69f285e2d1

View File

@ -29,9 +29,9 @@ int main() {
if (fgets(ingredient, MAX_NAME_LEN, stdin) == NULL) { if (fgets(ingredient, MAX_NAME_LEN, stdin) == NULL) {
return 0; return 0;
} }
ingredient[strcspn(ingredient, "\n")] = '\0';
printf("Zadaj jedalny listok: \n");
printf("Zadaj jedalny listok:\n");
while (1) { while (1) {
char name[MAX_NAME_LEN], price[MAX_NAME_LEN]; char name[MAX_NAME_LEN], price[MAX_NAME_LEN];
@ -75,4 +75,3 @@ int main() {
printf("Nacitanych %d poloziek.\n", count); printf("Nacitanych %d poloziek.\n", count);
return 0; return 0;
} }