Solved
This is for IMLADRIS, KAMENIM
Posted on 1999-12-14
int Minutes(int s_hour, int s_minute, int e_hour, int e_minute, int *start)
{
int iStart = s_hour *24 + s_minute;
int iEnd = e_hour *24 + e_minute;
if (iStart > End)
iEnd += 24*+60;
*start = iStart;
return iEnd - iStart;
}
//s_time: start time
//c_time: duration
//return money
double Bill (double c_time, int s_time)
{
double charge;
if ((s_time > 8) || (s_time < 18))
{
charge = full_price * c_time;
if (c_time > 60)
charge -= charge * 0.1;
}
else
{
charge = discount *c_time;
if (c_time > 60)
charge -= charge * 0.1;
{
return charge;
}
This is suppose to read into a file that has these duration and charges
it keeps coming out to something else it supposed to be this 4.50, 3.75, 23.62
and the durations are 30, 15, 105