diff --git a/cv1/program.c b/cv1/program.c index b5afb1b..22f319e 100644 --- a/cv1/program.c +++ b/cv1/program.c @@ -5,7 +5,7 @@ void replace(char* DishName); struct MenuItem { - char category[50]; + char dish[50]; float price; }; @@ -16,10 +16,10 @@ int main(void) { struct MenuItem menu[] = { - {"Pizza", "Margarita", 4.4}, - {"Pizza", "Cucumber", 4.4}, - {"Pizza", "Ajika", 4.4}, - {"Pizza", "Paperoni", 4.4} + {"Pizza Margarita", 4.4}, + {"Pizza Cucumber", 4.4}, + {"Pizza Ajika", 4.4}, + {"Pizza Paperoni", 4.4} }; @@ -41,8 +41,9 @@ int main(void) { found = 1; replace(menu[i].dish); - replace(menu[i].category); - printf("Chcete to to:%s %s, Cena: %.2f\n",menu[i].category, menu[i].dish, menu[i].price); + + printf("%s\n%.2f\n", menu[i].dish, menu[i].price); + } }