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

could anyone please solve this problem the problem is Write a program in file br

ID: 3614326 • Letter: C

Question

could anyone please solve this problem the problem is Write a program in file bread.c to control a breadmachine. Allow the user to input the type of bread as 'W' for whiteand 'S' for sweet. Ask the user if the loaf size is double and ifthe baking is manual. The following table details the time chartfor the machine for each bread type. Display a statement for eachstep. If the loaf size is double, increase the baking time by 50percent. If baking is manual, stop after the loaf-shaping cycle andinstruct the user to remove the dough for manual baking. Usefunctions to display instructions to the user and to compute thebaking time.

Operation White Bread Sweet Bread Primary kneading 15 mins 20 mins Primary rising 60 mins 60 mins Secondary kneading 18 mins 33 mins Secondary rising 20 mins 30 mins Loaf shaping 2 seconds 2 seconds Final rising 75 mins 75 mins Baking 45 mins 35 mins Cooling 30 mins 30 mins could anyone please solve this problem the problem is Write a program in file bread.c to control a breadmachine. Allow the user to input the type of bread as 'W' for whiteand 'S' for sweet. Ask the user if the loaf size is double and ifthe baking is manual. The following table details the time chartfor the machine for each bread type. Display a statement for eachstep. If the loaf size is double, increase the baking time by 50percent. If baking is manual, stop after the loaf-shaping cycle andinstruct the user to remove the dough for manual baking. Usefunctions to display instructions to the user and to compute thebaking time.

Operation White Bread Sweet Bread Primary kneading 15 mins 20 mins Primary rising 60 mins 60 mins Secondary kneading 18 mins 33 mins Secondary rising 20 mins 30 mins Loaf shaping 2 seconds 2 seconds Final rising 75 mins 75 mins Baking 45 mins 35 mins Cooling 30 mins 30 mins Operation White Bread Sweet Bread Primary kneading 15 mins 20 mins Primary rising 60 mins 60 mins Secondary kneading 18 mins 33 mins Secondary rising 20 mins 30 mins Loaf shaping 2 seconds 2 seconds Final rising 75 mins 75 mins Baking 45 mins 35 mins Cooling 30 mins 30 mins

Explanation / Answer

please rate- thanks #include #include char gettype(); char getdouble(); char getmanual(); void print(char,char,int,int,int,int,int,int,int,int); int main() {char type,doubleloaf,manual; type=gettype(); if(type!='X')     {doubleloaf=getdouble();     if(doubleloaf!='X')         {manual=getmanual();           if(manual!='X')             if(type=='S')                print(doubleloaf,manual,20,60,33,30,2,75,35,30);             else                 print(doubleloaf,manual,15,60,18,20,2,75,45,30);                        }    } getch(); } char gettype() {char type; printf("Enter Bread Type: W for White, S for sweet "); scanf("%c",&type); fflush(stdin); if(type!='S'&&type!='W')      {printf("Invalid Bread Type-Can't use thisMachine ");       return 'X';      } else     return type; } char getdouble() {char type; printf("Enter Loaf Size: S for Single, D for Double "); scanf("%c",&type); fflush(stdin); if(type!='S'&&type!='D')      {printf("Invalid Loaf Size-Can't use thisMachine ");       return 'X';      } else     return type; } char getmanual() {char type; printf("Enter Baking Type: M for Manual, B for BreadMachine "); scanf("%c",&type); fflush(stdin); if(type!='M'&&type!='B')      {printf("Invalid Baking Type-Can't usethis Machine ");       return 'X';      } else     return type; } void print(char d,char m,int pk,int pr,int sk,int sr,int ls,intfr,int b,int c) {printf(" Operating Times "); printf("Operation            Time "); printf("Primary Kneading   %4d mins ",pk); printf("Primary rising     %4d mins ",pr); printf("Secondary kneading %4d mins ",sk); printf("Secondary rising   %4d mins ",sr); printf("Loaf shaping       %4dseconds ",ls); if(m=='M')       printf("Remove dough for manualbaking "); else      {printf("Finalrising       %4d mins ",fr);      if(d=='D')          b*=2;      printf("Baking            %4d mins ",b);      printf("Cooling           %4d mins ",c);       } }