V
valentin tihomirov
My rateonale is:
-1 mod 3 = must be 3
0 mod 3 = 0
1 mod 3 = 1
2 mod 3 = 2
3 mod 3 = 3
4 mod 3 = 0
= 1
= 2
= 3
= 0
We note a sequence: 0 1 2 3 0 1 2 3 0 1 2 3. Going in backward direction, we
get 3 2 1 0 3 2 1 0 3 2 1 0.
Since (0 % N) is 0, going one step back (-1 % N) must result in N. But c#
compiler gives me -1. It is wrong. Fix it. The C#LS seems wrong. Correct it.
-1 mod 3 = must be 3
0 mod 3 = 0
1 mod 3 = 1
2 mod 3 = 2
3 mod 3 = 3
4 mod 3 = 0
= 1
= 2
= 3
= 0
We note a sequence: 0 1 2 3 0 1 2 3 0 1 2 3. Going in backward direction, we
get 3 2 1 0 3 2 1 0 3 2 1 0.
Since (0 % N) is 0, going one step back (-1 % N) must result in N. But c#
compiler gives me -1. It is wrong. Fix it. The C#LS seems wrong. Correct it.