Question: I have my c++ code for the problem that is given below. But i need help to follow this instructions. I also need output when

I have my c++ code for the problem that is given below. But i need help to follow this instructions.

I also need output when the coupon is not used. There are no function prototypes. Also functions should appear at the end after the main body

in this exercise, you will modify the program that you createdin the chapter 6's lab 6-2. If necessary create a newproject named Intermediate21 oroject, and save it in the cpp8\Chap09 folder. copy the instructions from lab 6-2.cpp file into a source file named Intermediate21.cpp. Change the file name in the first commnet. Dodify the program so that it uses two value-returning functions: one to calculate and return the price of a medium pizza and the other to calculate and return the price of large pizza. In addition to the $2 coupon on the purchase of a large pizza. Sophia is now emailing a customers a $1 coupon on the purchase of a medium pizza. Test the program appropriately.

Here is the lab 6-2

I have my c++ code for the problem that is given below.

Here is the code for this program:

#include #include using namespace std; double Medium() { char coupon = ' '; double price = 9.99; cout>coupon; if(toupper(coupon)=='Y') price -= 1; return price; } double Large() { char coupon = ' '; double price = 12.99; cout>coupon; if(toupper(coupon)=='Y') price -= 2; return price; } int main() { char size,coupon; double price =0.0; cout>size; size=toupper(size); if(size != 'M' && size != 'L') cout

Output:

M(edium) or L(arge) pizza? M $1 coupon (Y/N)? Y Price: $8.99

M(edium) or L(arge) pizza? L $2 coupon (Y/N)? Y Price: $10.99

This program is right but i need to include these things. Please help me.

I also need output when the coupon is not used. There are no function prototypes. Also functions should appear at the end after the main body

Lab 6-2 1 //Lab6-2.cpp displays the price of a pizza. 2 Created/revised by kyour name> on 5 #include 6 using namespace std; 8 int maino 9 f 10 char size 11 char coupon 12 double price 0.0 13 14 cout "Mcedium) or LCarge) pizza? 15 cin size; 16 size toupper (size) 18 if (size M' && size L') cout "Please enter either M or L end 19 20 else 21 22 if (size 'M') 23 price 9.99 else 25 large pizza 26 price 12.99 cout $2 coupon (Y/N)? 27 28 cin coupon; if (toupper (coupon) 'Y') 29 30 price 2; //end if 31 32 //end if

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!