# Thread: manipulating the remainder of a float

1. ## manipulating the remainder of a float

hi im having a problem finding any stuff on the remainder of a float and how to use and seperate it form the int part of a float ie 8700/1200=7 remainder300
i was wondering if any one could post a few links or give me an idea of how this type of thing works.

2. ok i just found something about using a % and a / to get the remainder?
if using a % and a / will alow me to store the remainder of a sum then could some one please just explain how to include it in the sum thank you again

3. int quotient = 8700/1200; // Quotient = 7
int remainder = 8700 % 1200; // Remainder = 300

4. % doesn't work on reals, you must use fmod().

5. ok thank you ill try and use the % thank you for your help

6. yay thank you so much you just made my job so much easier.
now all i have to do is re write the new parts into my program ive just testes a small part and it already works so much more accuratly
again thank you