Which is the best way to find out whether the division of two numbers will return a remainder? Let us take for example, I have an array with values {3,5,7,8,9,17,19}. Now I need
Use the modulus operator %, it returns the remainder.
%
int a = 5; int b = 3; if (a % b != 0) { printf("The remainder is: %i", a%b); }