-1
Good afternoon,
I’m doing a function that gives me back the amount of the postage to pay, where this is provided through intervals, ie:
Weight <= 1 Kg returns 3,00
Weight <= 2 Kg returns 4,00
Weight <= 3 Kg returns 6,00 ...
Up to Weight <= 30 Kg returns 20,00 ...
Only my problem is if the product weighs for example 31 kg this should take the size of 30 kg + size of 1 kg and add the two and so on.
Another example the product weighs 68.5, that is, it should be 30 kg +30 kg+1 kg and add up all values.
But I don’t know how to do this algorithm, can you help me? Thank you
1 will be 3.00, 2 will be 4.00, 3 will be 6.00. From 4 to 19 will be what?
– Lucas de Carvalho
I didn’t understand why the -1, since the weight between 4 and 30 can be any value. But I was able to do the algorithm as intended.
– Allen Striker
it wasn’t me who gave the -1, I just asked the question above! Abs;
– Lucas de Carvalho