Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Enter product category (M,P,D,C,N,Q) -> M Enter item name -> Chicks Enter cost o

ID: 3615528 • Letter: E

Question

Enter product category (M,P,D,C,N,Q) -> M

Enter item name -> Chicks

Enter cost of item (in cents) -> 599

Enter meat type (R,P,F) -> P

Enter date of packaging (#-#-#) -> 12-02-2008

Enter date of expiration (#-#-#) -> 01-10-2009

Enter product category (M,P,D,C,N,Q) -> P

Enter item name -> RabbitFood

Enter cost of item (in cents) -> 49

Enter produce type (F,V) -> V

Enter date received (#-#-#) -> 12-01-2008

Enter product category (M,P,D,C,N, Q) -> Q

Here is our stock:

We have Chicks in our Poultry Dept. that costs 5.99per pound. It was packed on 12-02-2008 and will expire on01-10-2009.

We have RabbitFood in our Vegetable Dept. that costs49 cents per pound. It was received on 12-01-2009.


Explanation / Answer

please rate - thanks hope this will get you started #include #include struct date {int month; int day; int year; }; struct product {char name[15]; char type; struct date rec; struct date exp; int aisle; char side; int cost; }item[50]; void print(struct product); void getmeatinfo(struct product); void getproduceinfo(struct product); void getdairyinfo(struct product); void getcannedinfo(struct product); void getnoninfo(struct product); int main() {int i=-1,j; do {i++; printf("Enter product category (M,P,D,C,N,Q) -> "); scanf("%c",&item[i].type); switch(item[i].type) {case 'M': getmeatinfo(item[i]);           break; case 'P': getproduceinfo(item[i]);           break; case 'D': getdairyinfo(item[i]);           break; case 'C': getcannedinfo(item[i]);           break; case 'N': getnoninfo(item[i]);           break; default: printf("invalid input ");           break;         case 'Q':break; }               }while(item[i].type!='Q'); printf("Here is our stock: "); for(j=0;j