This project is a console application that reverses each word in an input line while keeping all non-alphabetic symbols in their original places. Words are defined as sequences of alphabetic characters separated by spaces. Spaces and other non-alphabetic symbols are not removed or altered in their positions within the input string.
- Reverses each word in the input line.
- Keeps all non-alphabetic symbols in their original positions.
- Retains all spaces in their original positions as well.
-
Input:
"abcd efgh"
Output:"dcba hgfe"
-
Input:
"Test"
Output:"tseT"
-
Input:
"a1bcd efg!h"
Output:"d1cba hgf!e"
-
Input:
" a1bcd efg!h"
Output:" d1cba hgf!e"