If the current digit is the missing digit , then keep the track of its sign
if ( c . charAt ( i ) == ' x ' ) { xSignIsPositive = ( w == 1 ) ; } else { c_mod_11 = ( c_mod_11 + w * ( c . charAt ( i ) - '0' ) ) % 11 ; } w = w * - 1 ; }