Print 1 ' s ▁ and ▁ 2' s complement of binary number represented by " bin "
static void printOneAndTwosComplement ( String bin ) { int n = bin . Length ; int i ; String ones = " " , twos = " " ; ones = twos = " " ;