Question: Write a program that prompts the user for the starting time and the number of minutes of the call and display the charges. The charges
Write a program that prompts the user for the starting time and the number of minutes of the call and display the charges. The charges are based on the start time of the call and use the correct rate for the time range it falls into (see table below). The start time will be entered as a floating point number (decimal) in the form HH.MM. For example, 07:00 would be entered as 07.00 and 16:28 will be entered as 16.28.
Must not accept times that are greater than 23.59 (note that 6.69 is less than 23.59 but is an invalid time).
Must not accept time whose last two digits are greater than 59.
HINT the following expression will give you its fractional part num static_cast
Validate that the number of minutes of the phone call is not negative
Named constants must be used for the values in the following table.
| Start Time of Call | Rate Per Minute |
| 00:00 06:59 | 0.12 |
| 07:00 12:59 | 0.23 |
| 13:00 19:00 | 0.55 |
| 19:01 23.59 | 0.35 |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
