Solved

# mathmatic

Posted on 2003-12-08
173 Views
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 .
0
Question by:sraab2004
• 3

LVL 7

Expert Comment

ID: 9902454
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

LVL 27

Expert Comment

ID: 9902461
just to agree with motaz, give a result-sample
0

LVL 7

Accepted Solution

Motaz earned 70 total points
ID: 9902474
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

LVL 7

Expert Comment

ID: 9902490
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

## Featured Post

### Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …