Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ARRAYs
#2
How about a function to compute just the "Daily Benefit"?

Macro Macro52
Code:
Copy      Help
double MB=4500
out
rep 10
,out "MB = %.0f, DB = %d" MB sub.getDB(MB)
,MB+100

#sub getDB
function double'MB

int DB
double Result=MB/30
;out "Daily Benefit = %.0f" Result
str s.format("%.0f" Result)
int r=val(s)%10
if(r<5) DB=val(s)-r
else DB=val(s)+(10-r)
ret DB


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)