To get a column number (or, more precisely, “left 3 or right 3”) subtract 1 and do a %
modulus operator: (value-1) % 6
. The result will be 0..2 (or “left column”) or 3..5 (so “right column”).
1
solved how to check number in range with n level
To get a column number (or, more precisely, “left 3 or right 3”) subtract 1 and do a %
modulus operator: (value-1) % 6
. The result will be 0..2 (or “left column”) or 3..5 (so “right column”).
1
solved how to check number in range with n level