+ 2
How does the ℅ sign work and calculate?
how does the ℅ sign calculate in Java. I am having trouble finding solution for this.
4 Respostas
+ 4
% is the modulo operator and it divides the first number by the second number and returns the rest:
int x = 5%2; //x is 1
int y = 9%10; //y is 9
int z = 47%8; //z is 7
+ 1
Thanks freakman I now realise what I was doing wrong
+ 1
yeah that's exactly what I was doing using the wrong symbol to calculate ℅ instead of %