Oct 23, 2005 21:16
#include
#include
//Laura Campbell
int getDay();
int getTime(apstring);
int Findlength(int,int);
double findcost(double,double);
bool display(int);
void displa(int,int);
void displ(int);
void disp(double);
void dis(int,int);
int main()
{
int day=getDay();
int time=getTime("started");
int time2=getTime("ended");
int length=Findlength(time,time2);
int count;
display(day);
displa(time, time2);
displ(length);
double cost=findcost(length,cost);
disp(cost);
dis(day,time);
return 0;
}
int getDay()
{
int day;
cout<<"Please enter the corresponding number of the day that the call began."<>day;
cin.ignore();
return day;
}
int getTime(apstring call)
{
int time;
cout<<"Please enter the time your call "<>time;
cin.ignore();
return time;
}
int Findlength(int time,int time2)
{
int foo;
if (time2 < time) time2 = time2 + 2400;
return(((time2/100)-(time/100))*60)+((time2%100)-(time%100));
}
double findcost(double length, double cost)
{
cost=length*.11;
return cost;
}
bool display(int day)
{
if(day==1)cout<<"Monday"<= 700 && time < 1700) cout<<"none"<= 1700 && time < 2300) cout<<"20%"<=2300 && time < 700) cout<<"40%"<