A Telephone company charges the following for long distance calls:
• .50 per minute for regular rate
• Any calls after 6:00 pm (1800) and before 6:00 am(600) receive a 50% discount
• Any calls longer than 1 hour receive an addition 15% discount after all other discounts are applied.
• All calls receive 4% federal tax and 2% state tax to be calculated into the final cost. After all discounts are applied.
Write a program that will get the cost for a long distance phone call. Prompt the user to enter in the time of the start of the phone call (in 24-hour clock format) and the length of the call. Print the gross cost of the phone call before any discounts are applied, the costs after all the discounts are applied, and the total cost of the phone call with the taxes added.
What I have so far:
#include <iostream>
using namespace std;
The "hrout" and "hrln" are being used without being initialized. Meaning, they don't have any values associated with them. What are their functions in your code?