0
having trouble with modulo operator
problem lesson states x = 9 x % 2 = 2 x += 3 not look for answer to lesson question but trying to understand is the value for x changing with each part of question or is it always 9 for each?
1 Answer
+ 1
1) x=9
2)
x%2=2
9%2=2
1=2 (no reference to x ignored)
3)
x+=3
9+=3
9=9+3
9=12 (no reference to x ignored)