The mod operator doesn't work on doubles -- only integers. And why is mph a double? Your program isn't even using the fractional parts so you might as well make it an integer and that will solve the problem for you.
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
use fmod() function for doubles. Also do division with doubles, not integers or you will have problems with that too.
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343