#C13186. Shift Characters
Shift Characters
Shift Characters
You are given a string and your task is to output a new string where each alphabetical character is replaced by the next character in the ASCII sequence. Specifically:
- If the character is 'z', it wraps around to 'a'.
- If the character is 'Z', it wraps around to 'A'.
- Non-alphabetical characters remain unchanged.
For example, if the input is "Hello, World!", then the output should be "Ifmmp, Xpsme!".
Note: The solution must read input from standard input (stdin) and output the result to standard output (stdout). If any formulas are used in your explanation, they should be formatted in LaTeX
style.
inputFormat
The input consists of a single line containing the string to transform. The string may include spaces, punctuation, and numbers.
Example:
Hello, World!
outputFormat
The output should be a single line containing the transformed string.
Example:
Ifmmp, Xpsme!## sample
Hello, World!
Ifmmp, Xpsme!