Otherwise print both parts
else { i = 0 ; while ( i <= ans ) { Console . Write ( str [ i ] ) ; i ++ ; } Console . WriteLine ( " " ) ; while ( i < n ) { Console . Write ( str [ i ] ) ; i ++ ; } Console . WriteLine ( " " ) ; } Console . WriteLine ( " " ) ; }