ou do not arrive too late. Housekeeping finishes preparing rooms by noon, and the sooner guests arrive after noon, the less they have to pay. But if the guest arrives earlier, they would need to wait for noon before they can checked-in. Build a C program that calculates your price to pay based on your guest's time of arrival. Your program will read an integer (0 to 23) indicating the military hour of your arrival. For example, 12 indicates 12 noon arrival, 13 means 1pm arrival, 0 means midnight arrival, etc. The base price is 1000 pesos, and 200 pesos are added for every hour

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
The Hotel Inn named as On Time Hotel in which you plan to spend the night tonight offers very interesting rates, as long as you do not arrive too late. Housekeeping finishes preparing rooms by noon, and the sooner guests arrive after noon, the less they have to pay. But if the guest arrives earlier, they would need to wait for noon before they can checked-in. Build a C program that calculates your price to pay based on your guest's time of arrival. Your program will read an integer (0 to 23) indicating the military hour of your arrival. For example, 12 indicates 12 noon arrival, 13 means 1pm arrival, 0 means midnight arrival, etc. The base price is 1000 pesos, and 200 pesos are added for every hour after noon. Thankfully the total is capped at 2000 pesos, so you'll never have to pay more than that. Your program should print the price (an integer) you have to pay, given the input hour of arrival. Additionally, If the client arrives from 6 until 11, then program must ask first whether they are checking-in now, If yes, then they must be charged at the capped price. On the other hand, if not, then they must be told to wait for 12 noon for check-in. Note: If the user entered a float, then it would be read as an integer
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Bare Bones Programming Language
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
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education