Problem

Long-Distance Calls A long-distance carrier charges the following rates for telephone c...

Long-Distance Calls

A long-distance carrier charges the following rates for telephone calls between the United States and Mexico:

Write a program that asks for the starting time and the number of minutes of the call, and displays the charges. The program should ask for the time to be entered as a floating-point number in the form HH.MM. For example, 07:00 hours should be entered as 07.00, and 16:28 hours should be entered as 16.28.

Hint: To find the fractional part of the entered number you can use the following expression:

startTime - static_cast<int>(startTime)

Input Validation: Figure out what inputs are valid for startTime, and how the program will handle invalid inputs.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT