# Help with calculation plz!!!

Question asked by Bricktop on Sep 21, 2010
Latest reply on Sep 25, 2010 by Bricktop

### Title

Help with calculation plz!!!

### Post

I am so close to finished when I  started to check eveything this calculation didnt work out all the way. I  tried to work it out with "<" and ">" I just cant get it add it  up right. 4 days is equal price to 7 days, 3 weeks is equal to a month  and 28 days is one month rental.  SO if i had an item at \$1.00 a day 4  days or 7 days equals \$4.00.  8 days is \$5.00  but 11 to 14 days is  \$8.00

Let ( [
n = rental length ;
m = Div ( n ; 28 )  ;  // month
w = Div ( n - m * 28 ; 7 ) ;  // week
d = n - ( m * 28 + w * 7 )  // day
] ;
Case ( vendor="Company A";
m * equipment::company a_price monthly + w * equipment::company a_price  weekly + d *equipment::company a_price daily;

( vendor="Company B"; m *equipment::company a_ monthly+ w *equipment::company b_weekly + d  *equipment::company b_price daily;))

I hope this all clear