hi people.I want to divide 2 numbers and to get the full integer of the result,not with comas.for example i wnt to divide 10 with 3 and i want the result to be 3 ,not 3,1 or whatever it is...I knew this kind of things I just can't remember it.it was the oposite of %
There is also two other functions that might help if you want to always round up or down. ceil() - Always rounds up floor() - Always rounds down
I know you've already solved your problem but the % operator only ever gives you the remainder. 10%3 is 1. 10%4 is 2. 10%5 is 0. etc To get the number of times the whole number is in another number, you just do a normal division and floor it. floor(10/3) = 3 floor(10/4) = 2 floor(10/5) = 2