//OrinTill Qimid CS1A Chapter 4, P. 221, 10
//
/**************************************************************
 * calculate call charges
 * 
 * ____________________________________________________________
 * This program will claculate how much it would cost for long distance call.
 * ____________________________________________________________
 * INPUT
 * when : the time of the call.
 * time : how long the call was.
 * OUTPUT
 * cost : the total cost of the phone call.
 **************************************************************/
#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;

int main() 
{
    float when,
    time,
    cost;
    cout<<"At what time was your phone call?(please enter in HH.MM ex 7:00 is 7.00)"<<endl;
    cin>> when;
    if (when<0)
    {
        cout<<"sorry that's not a valid time"<< endl;
    }  
    cout<<"How long as your phone call?"<< endl;
    cin>>time;
    if (when<=6.59)
    {
        cost = time * 0.12;
        cout<<"your cost would be $"<<cost<<endl;
    }
    else if (when<=19.00)
    {
        cost=time * 0.55;
        cout<<"your cost would be $"<<cost<<endl;
    }
    else if (when<=23.59)
    {
       cost=time * 0.35;
       cout<<"your cost would be $"<<cost<<endl;
    }
    
    
  
    
    
 
	return 0;
}