C program to find remainder of two numbers without using modulus (%) operator
Given two integer numbers and we have to find the remainder without using modulus operator (%) in C.
Here, we will read two integers numbers and find their remainder. To get the remainder we will not use the modulus (%) operator.
Formulas to get the remainder,
1) Using modulus (%) operator
rem = a%b;
2) Without using modulus (%) operator
rem = a-(a/b)*b;
Here, a and b are the input numbers.