Update cv1/program.c

This commit is contained in:
Yurii Chechur 2024-10-02 07:58:10 +00:00
parent c770736dc3
commit 76cada1cdd

View File

@ -5,7 +5,7 @@
void replace(char* DishName); void replace(char* DishName);
struct MenuItem { struct MenuItem {
char category[50];
char dish[50]; char dish[50];
float price; float price;
}; };
@ -16,10 +16,10 @@ int main(void) {
struct MenuItem menu[] = { struct MenuItem menu[] = {
{"Pizza", "Margarita", 4.4}, {"Pizza Margarita", 4.4},
{"Pizza", "Cucumber", 4.4}, {"Pizza Cucumber", 4.4},
{"Pizza", "Ajika", 4.4}, {"Pizza Ajika", 4.4},
{"Pizza", "Paperoni", 4.4} {"Pizza Paperoni", 4.4}
}; };
@ -41,8 +41,9 @@ int main(void) {
found = 1; found = 1;
replace(menu[i].dish); 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);
} }
} }