Ricky158
12-02-2002, 05:07 AM
I want to make a price finder thing. It is based on how much of the item the person wants.
For every 5 items, you deduct $1. So the cost for 6 items is $5. 3 items is $3, because 5 cannot go into 3 and get more than 1.
MORE EXAMPLES: 23 = $19 -- 5 goes into 23 4 times. 23 minus 4 equals 19.
48 = $39 -- 5 goes into 48 9 times. 48 minus 9 equals 39.
if it is an exact multiple of 5, like 30, you add $0.50 to the price of the number below it. so 30 would be like doing 29 = $24.50
I don't know how to write a script like this, someone here probably does.
I want it to be in textbox and button form. So you enter the amount of items in one box, and in the other text box it displays the price, after clicking a button to do the math.
any help at all is greatly appreciated.
thanks,
ricky
For every 5 items, you deduct $1. So the cost for 6 items is $5. 3 items is $3, because 5 cannot go into 3 and get more than 1.
MORE EXAMPLES: 23 = $19 -- 5 goes into 23 4 times. 23 minus 4 equals 19.
48 = $39 -- 5 goes into 48 9 times. 48 minus 9 equals 39.
if it is an exact multiple of 5, like 30, you add $0.50 to the price of the number below it. so 30 would be like doing 29 = $24.50
I don't know how to write a script like this, someone here probably does.
I want it to be in textbox and button form. So you enter the amount of items in one box, and in the other text box it displays the price, after clicking a button to do the math.
any help at all is greatly appreciated.
thanks,
ricky