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++)