Question: Write a C program to compute the total grocery purchase using structures. Define structures date and grocery item as follows struct date 1 int day


Write a C program to compute the total grocery purchase using structures. Define structures date and grocery item as follows struct date 1 int day int month; int year; struct grocery_item f char itemName [30]; int quantity; float price; float amount; struct date expirationDate; Follow the steps below to design your program. 1. 2. 3. Declare an array of grocery_item's with 100 entries. Declare a float number to compute total_purchase For each item, read: a. itemName, b. quantity, c. price d. expiration date in the format mm-dd-yyyy 4. Compute amount- price quantity for each item. 5. Repeat steps 3 - 5 until a 0 is entered to stop input. 6. Calculate total_purchase by adding the amounts of all items. 7. Display the details and the total_purchase
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
