what is the correct implementation of the 8-bit Fletcher algorithm in java?
问题 i am trying to implement the 8-bit fletcher algorithm. I wrote a piece of code that does that but i am not sure if i understood the algorithm correctly. this is my piece of code: public class TestFletcher { public static void main(String[] argv) { String bin = "10010010101111101110101101110011"; char[] cA = bin.toCharArray(); int ckA = 0, ckB = 0; for (int i = 0; i < cA.length; i++){ ckA += Integer.valueOf(cA[i])/49; ckB += ckA; } System.out.println(ckA); System.out.println(ckB); } the