From 52075c4d576ef89d7aceb23cb5c4497bf4bf47de Mon Sep 17 00:00:00 2001 From: Ivan Leichenko Date: Tue, 1 Oct 2024 13:35:43 +0200 Subject: [PATCH] update program.c --- cv1/program.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cv1/program.c b/cv1/program.c index ac34f4a..d7b8441 100644 --- a/cv1/program.c +++ b/cv1/program.c @@ -100,7 +100,7 @@ int main() int* items = search(find,itemc,menu,&sitemc); for (int i = 0; i < sitemc; i++) { - printf("%s\n%.2f\n", menu[i].name, menu[i].price); + printf("%s\n%.2f\n", menu[items[i]].name, menu[items[i]].price); } printf("Nacitanych %d poloziek.\n", itemc); for (int i = 0; i < itemc; i++)