having trouble with modulo operator | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
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?

30th Sep 2022, 10:07 PM
Kurt Nichols
1 Answer
0
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)
1st Oct 2022, 1:23 AM
Azhagesanヾ(✿)
Azhagesanヾ(✿) - avatar