ELI994
سه شنبه 03 اردیبهشت 1392, 12:23 عصر
int from,to
float result;
int in = (x/100);
in = in * 60;
AnsiString in1 = in + x %100;
from = StrToInt( in1);
in = 0; in1="";
in = (y/100);
in = in * 60;
in1 = in + y %100;
to = StrToInt( in1 );
result = 0;
if(to > from)
result = to - from;
else
result =(1440 - from) + to;
if(result >= 60)
{
if((int) result %60 == 0)
return ( (int)(result/60))* 100;
else
{
AnsiString p = (int) result %60;
if( StrToInt(p) < 10)
p = "0" + p;
return StrToInt(IntToStr((int)(result/60)) + p );
}
}
else
return(result);
}
float result;
int in = (x/100);
in = in * 60;
AnsiString in1 = in + x %100;
from = StrToInt( in1);
in = 0; in1="";
in = (y/100);
in = in * 60;
in1 = in + y %100;
to = StrToInt( in1 );
result = 0;
if(to > from)
result = to - from;
else
result =(1440 - from) + to;
if(result >= 60)
{
if((int) result %60 == 0)
return ( (int)(result/60))* 100;
else
{
AnsiString p = (int) result %60;
if( StrToInt(p) < 10)
p = "0" + p;
return StrToInt(IntToStr((int)(result/60)) + p );
}
}
else
return(result);
}