Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

ans Write a program that reads from the user the amount of a restaurant bill as well as tax rate and then applies a random

image text in transcribed

image text in transcribed

ans Write a program that reads from the user the amount of a restaurant bill as well as tax rate and then applies a random amount of tip between 15% and 20% of the amount of the bill and displays the total amount due (including tax and tip). It then asks the user how many people in the party and divides the total amount by the number of people and displays the amount for each person in the group. It then asks for and reads from the user a separator character, such as comma, space, tab or new line and displays the information using the separator character (see the example below): Enter date: 9/30/2020 Enter restaurant name: Cheesecake Factory is Enter Street and city: Lake Ave, Pasadena des Enter bill amount: $100 erences Enter tax rate in %: 9 borations Total including tax of 9% and gratuity of 18% is $127.00. Enter number of people to divide by: 4 folium Tutor Amount for each of 4 persons: $31.75 Enter a separator character: [TAB] at Tag $9.25 Eoch portion: $31.75 Tip: $18.00 Bill amount: $100.00 fice 365 KVC Library Press any key to continue som AVC Online Tutoring Second example: Enter date: 9/29/2020 Enter restaurant name: Raffi's Place Enter Street and city: Broadway Ave. Glendale Enter bill amount: $200 Enter tax rate in 9 Total including tax of 9% and gratuity of 17% is $252.00. IMG_1935.jpeg Second example: Online ing Enter date: 9/29/2020 Enter restaurant name: Raffi's Place Enter Street and city: Broadway Ave. Glendale Enter bill amount: $200 Enter tax rate in %: 9 Total including tax of 9% and gratuity of 17% is $252.00. Enter number of people to divide by: 1 Amount for each of 4 persons: $252.00 Enter a separator character: Bill amount: $200.00 Tax: $18,Tip: $34.00,Each portion: $252.00 Press any key to continue. In in the above example, if the user entered a new line instead of comma for the separator: Bill amount: $200.00 Tax $18 Tip: $34.00 Each portion: $228.00 Press any key to continue Make sure the program pauses and waits for a key to be pressed before continuing Put your name on top as a comment. Use comments to explain about half of your statements After building and testing the program, submit the cpp file. Previous ans Write a program that reads from the user the amount of a restaurant bill as well as tax rate and then applies a random amount of tip between 15% and 20% of the amount of the bill and displays the total amount due (including tax and tip). It then asks the user how many people in the party and divides the total amount by the number of people and displays the amount for each person in the group. It then asks for and reads from the user a separator character, such as comma, space, tab or new line and displays the information using the separator character (see the example below): Enter date: 9/30/2020 Enter restaurant name: Cheesecake Factory is Enter Street and city: Lake Ave, Pasadena des Enter bill amount: $100 erences Enter tax rate in %: 9 borations Total including tax of 9% and gratuity of 18% is $127.00. Enter number of people to divide by: 4 folium Tutor Amount for each of 4 persons: $31.75 Enter a separator character: [TAB] at Tag $9.25 Eoch portion: $31.75 Tip: $18.00 Bill amount: $100.00 fice 365 KVC Library Press any key to continue som AVC Online Tutoring Second example: Enter date: 9/29/2020 Enter restaurant name: Raffi's Place Enter Street and city: Broadway Ave. Glendale Enter bill amount: $200 Enter tax rate in 9 Total including tax of 9% and gratuity of 17% is $252.00. IMG_1935.jpeg Second example: Online ing Enter date: 9/29/2020 Enter restaurant name: Raffi's Place Enter Street and city: Broadway Ave. Glendale Enter bill amount: $200 Enter tax rate in %: 9 Total including tax of 9% and gratuity of 17% is $252.00. Enter number of people to divide by: 1 Amount for each of 4 persons: $252.00 Enter a separator character: Bill amount: $200.00 Tax: $18,Tip: $34.00,Each portion: $252.00 Press any key to continue. In in the above example, if the user entered a new line instead of comma for the separator: Bill amount: $200.00 Tax $18 Tip: $34.00 Each portion: $228.00 Press any key to continue Make sure the program pauses and waits for a key to be pressed before continuing Put your name on top as a comment. Use comments to explain about half of your statements After building and testing the program, submit the cpp file. Previous

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

Advanced Database Systems For Integration Of Media And User Environments 98

Authors: Yahiko Kambayashi, Akifumi Makinouchi, Shunsuke Uemura, Katsumi Tanaka, Yoshifumi Masunaga

1st Edition

9810234368, 978-9810234362

More Books

Students also viewed these Databases questions

Question

7. Discuss the key features of the learning organization.

Answered: 1 week ago