If the number is larger than 2, subtract 2 until it’s in the range 0-2
Think there might be an off by one error in here; I’m not seeing a way for it to ever return 0 as the answer
Yeah, you should be subtracting 3 rather than 2. (Taking the result mod 3).
Thanks! I think it’s correct now.
Think there might be an off by one error in here; I’m not seeing a way for it to ever return 0 as the answer
Yeah, you should be subtracting 3 rather than 2. (Taking the result mod 3).
Thanks! I think it’s correct now.