lundi 29 mai 2017

How to use % for float numbers?

I am trying to filter through a float number given by the user and find the largest digit within. However, I keep getting the error:

error: invalid operands to binary % (have 'float' and 'int')

I have read other forums stating us the fmod function, how would I apply that with a simple piece of code that I just want to find the remainder of a float?

Aucun commentaire:

Enregistrer un commentaire