int reverse(int m) { int result = 0; for(inti=0;i<8;i++){ //while(m)不行 { result |= m&1; result<<1; m> >1; } return result; }