The phone company used the following rate structure for calls from San Francisco to Miami, Florida back in 1995:
Write a program that reads from the user the start time for a call based on a 24-hour clock and the length of the call in minutes. The gross cost (before any discount or tax) should be printed, and then the net cost (after discounts and taxes).
Hint: in order to get the numbers to print with two digits after the decimal point, #include <iomanip> at the top of your program and use something like
cout << setprecision(2) << fixed << ....
You should use named constants whenever possible. The only number that should appear inside main() is the "2" in your setprecision(2).
Sample output 1:
Enter start time: 2322
Enter length of call in minutes: 67
The gross cost is $26.80
The net cost is $11.85
Sample output 2:
Enter start time: 759
Enter length of call in minutes: 10
The gross cost is $4.00
The net cost is $2.08
Sample output 3:
Enter start time: 1300
Enter length of call in minutes: 100
The gross cost is $40.00
The net cost is $35.36
Sample output 4:
Enter start time: 1300
Enter length of call in minutes: 10
The gross cost is $4.00
The net cost is $4.16