Question: In this exercise, you will modify the tip program shown earlier in Figure 7-31. Follow the instructions for starting C++ and viewing the ModifyThis16.cpp file,

In this exercise, you will modify the tip program shown earlier in Figure 7-31. Follow the instructions for starting C++ and viewing the ModifyThis16.cpp file, which is contained in either the Cpp8\Chap07\ModifyThis16 Project folder or the Cpp8\Chap07 folder. 

Problem specification Create a program that allows the user to enter the amount of a restaurant bill. The program should calculate and display the suggested amounts to tip a waiter using rates of 10%, 15%, and 20%. Use a counter to keep track of the three rates. IPO chart information

(You may need to open the project/solution file first.) Change the for statement to a while statement. Save and then run the program. Test the program using 90.50 as the restaurant bill. The three tips should appear as shown earlier in Figure 7-32.

Problem specification Create a program that allows the user to enter the

Problem specification Create a program that allows the user to enter the amount of a restaurant bill. The program should calculate and display the suggested amounts to tip a waiter using rates of 10%, 15%, and 20%. Use a counter to keep track of the three rates. IPO chart information Input C++ instructions double bill = 0.0; rate (counter: 10% to 20% in increments of 5%) in the for clause bill this variable is created and initialzed Processing none Output tip double tip = 0.0; %3D Algorithm 1. enter the bill cout "Bill amount: "; cin >> bill; 2. repeat for (rate from 10% to 20% in increments of 5%) calculate tip by multiplying the bill by the rate for (double rate = 0.1; rate

Step by Step Solution

3.44 Rating (160 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

ModifyThis16cpp displays three tip amounts Createdr... View full answer

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 An Introduction Programming Questions!