0
How to write a program on calculating remainder without using modulus operators?
You can only use multiplication, division and subtraction for these.
5 Answers
+ 4
@Gordie, because I'm no good in Math : D
+ 3
int num = 10;
int divisor = 3;
while(num != 0)
{
if(num < divisor) break;
num -= divisor;
}
Console.WriteLine(num);
+ 1
you need smt like this
https://code.sololearn.com/cqEEcDkX37hw/?ref=app
+ 1
@Gordie, cause we only can add or subtract, multiplication is way above our limit :)