calculate the total charges for the duration stayed at the hotel

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter7: Arrays
Section: Chapter Questions
Problem 8PP: (Statistical) In many statistical analysis programs, data values considerably outside the range of...
icon
Related questions
icon
Concept explainers
Question

write a C++ program that prompts the user to get the number of days to stay at the hotel and to choose a price per night from a list of prices provided in the prompt.

your program is to calculate the total charges for the duration stayed at the hotel as follow

tax rate should be used as a constant 8%

your program should display the following:

Customer name, number of days, cost per day, taxes paid and total charges

sample input:

Customer Name: xxxxxxxxxxxx

number of days: xx

cost per night (100, 125, 150, 200): xx

 

Sample output

                                                                            Type any hotel name here

Customer Name:      Number of days         Cost per day

----------------------    ---------------------     ----------------

John                             xx                                     xxx

 

Tax Amount: xxx

Total Charges: xxx

Thank you for staying at "hotel name"

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Operators
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr