Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Q3: (Tipping Chart) (20 points): A very popular application on cell phones is a tip amount calculator. Write a program that takes as input the

image text in transcribed

Q3: (Tipping Chart) (20 points): A very popular application on cell phones is a tip amount calculator. Write a program that takes as input the total amount of a restaurant bill. Then use a while loop to generate a chart of tip amounts for each percentage from 10% to 25%. Show the amount of the tip along with the total bill with the tip amount included. Below is a sample set of input and output for your program Sample input and output: Enter the total restaurant charge: $19.27 TippingChart---- Total Percent 10% 11% 12% 13% 14% 15% 16% 17% 18% 19% 20% 21% 22% 239 24% 25% Tip $1.93 $21.20 $2.12 $21. 39 $2.31 $21.58 $2.51 $21.78 $2.70 $21.97 $2.89 $22.16 $3.08 $22.35 $3.28 $22.55 $3.47 $22.74 $3.66 $22.93 $3.85 $23.12 $4.05 $23. 32 $4.24 $23.51 $4.43 $23.70 $4.62 $23.89 $4.82 $24.09 Note: To print an % symbol, use %% in the printf format string. The $ is part of the prompt, and not entered by the user. Caution: Float data types are converted to binary when stored, and slight inaccuracies can often result because of this conversion. Never use a float in a comparison condition of a while statement

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What should Belindas and Marcus next steps be?

Answered: 1 week ago

Question

1. Prepare a flowchart of Dr. Mahalees service encounters.

Answered: 1 week ago