Untitled
Anonymous
plain_text
12/05/2022 10:29 AM
556 B
18
Indexable
void print_promotions(groceries_list list[], int store) {
int i, j = 0;
for (i = 0; i < MAX; i++) {
if (strcmp(user_groceries[j], list[store].name[i]) == 0) {
j++;
if (list[store].onSale[i] == 1) {
printf("%s is on sale for %.2lf DKK!\n", list[store].name[i], list[store].cost[i]);
}
i = 0;
}
}
}Editor is loading...