The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 398 Weeks Ago, 3 Days Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
in programming C++
write the code to calculate the price of the hotel room for a number of nights that the user wants to stay in.
the price of the room per day is $149.00 ask the user for how many nights he or she wants to stay in the hotel .
after you find the total, apply a discount according to the rules: if the user entered 4 to 9 night, one night is free. For example: if user entered between 4 to 9 nights, you need to calculate the payment only for 5 nights.
If user entered 10 or more night,2 night are free. the program should display the total price for the number of night that the user entered, after the discount has been applied.
format the total as a decimal number with tow digits after the decimal point.
If an invalid number of nights is entered (less than 1), the program should display a message asking the user to enter a valid number of nights.
Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll