0

Remainder

I'm trying to get sum to equal the remainder of num * 3, which should be 1, but I'm struggling. I know there should be a % somewhere, but not sure where. Any help would be appreciated. int num = 10; sum = num * 3;

24th Feb 2021, 1:47 PM
Brian Curran
Brian Curran - avatar
2 Respuestas
+ 1
Brian Curran Use modulus operator (%) not multiplication operator.
24th Feb 2021, 1:58 PM
A͢J
A͢J - avatar
0
Cheers AJ!
2nd Mar 2021, 8:13 AM
Brian Curran
Brian Curran - avatar