27.10.2018, 12:52
The new line '\n' is one character. The problem is that it takes your input as two characters separated.
You need a loop and check if current index is equal to '\\' and index+1 is equal to 'n' character. Then replace index with ' ' and index+1 with '\n' character.
You need a loop and check if current index is equal to '\\' and index+1 is equal to 'n' character. Then replace index with ' ' and index+1 with '\n' character.