When I use % operator on float values I get error stating that \"invalid operands to binary % (have ‘float’ and ‘double’)\".I want to enter the integers value only but the n
You're probably better off using long long, which has greater precision than double in most systems.
Note: If your numbers are bigger than a long long can hold, then fmod probably won't behave the way you want it to. In that case, your best bet is a bigint library, such as this one.