mathmatic

Hi Iam working on internet cafe project(prepaid)  Ihave 2 editboxes named value (number)  and period (time)  Iwant full  function to count the period from value .
sraab2004Asked:
Who is Participating?
 
MotazCommented:
If I understand u, suppose that value is the money, and period is the time payed for that amount of money, and 1$ = 1 hour (60 minutes) of time, then the function could be:

function GetPeriod(Value: Double): Integer;
begin
  Result:= Round(Value * 60);
end;

example

  edPeriod.Text:= IntToStr(GetPeriod(StrToFloat(edValue.Text)));

Motaz
0
 
MotazCommented:
What do u mean by period, and what is value??
please give example of data and the output you want, example:

value = 50
period (time) = 10 hours or (time) = '12:23 pm'

Motaz
0
 
kretzschmarCommented:
just to agree with motaz, give a result-sample
0
 
MotazCommented:
I forget to mention that the result is minutes, for example

if you enter 1 you will get 60 minutes
2 = 120 minutes, and so on

Motaz
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.