Question: The following is a program that simulates a pizza delivery menu. A user can choose to buy pizza, breadsticks, pasta, OR wings. Fill in the
The following is a program that simulates a pizza delivery menu. A user can choose to buy pizza, breadsticks, pasta, OR wings. Fill in the missing pieces of the program so that the user can accurately input how many of their selected items they wish to buy and print the final cost at the end.
#include <stdio.h>
#define PIZZA 12.50
#define BREAD 3.00
#define WINGS 8.50
#define BREAD_STICKS 5.00
int main){
int selection, num_pizza=0, num_bread=0;
int num_pasta=0, num_wings=0;
double cost;
printf(“Welcome to the Pizza Corner!\n”);
printf(“What would you like to do?\n”);
printf(“\t 1 – Buy Pizza.\n”);
printf(“\t 2 – Buy Bread.\n”);
printf(“\t 3 – Buy Wings.\n”);
scanf(“%d”, &selection);
switch ( )
case ______:
break;
case ______:
break;
case _______:
break;
default: ______________
break;
}
cost =
printf(“Your total cost is _____.\n”, cost);
return 0;
}
Step by Step Solution
3.25 Rating (143 Votes )
There are 3 Steps involved in it
There are several missing pieces in the provided C program Lets fill them in step by step 1 Correct ... View full answer
Get step-by-step solutions from verified subject matter experts
