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(startTime)
Input Validation: Figure out what inputs are valid for startTime, and how the
program will handle invalid inputs.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here