Skip to Content
0
Former Member
Mar 25, 2008 at 10:19 AM

How to calculate upper limit of variable ?

25 Views

Hello Friends,

I want small logic here,

I have one variable like amt = 5.001.

If amount increses up to 5.005 then amt should be 5.000

i have created constant c_val = 0.005 also

if amount increses like 5.006 then amount should be 6.000

for example,

5.000 should be 5.000

5.001 should be 5.000

5.002 should be 5.000

5.003 should be 5.000

5.004 should be 5.000

5.005 should be 5.000

5.006 should be 6.000

5.007 should be 6.000

5.008 should be 6.000

5.009 should be 6.000

Note : i dont want to use CEIL fn.

points rewarded soon

Regards,

RH