#C2352. Case Inversion
Case Inversion
Case Inversion
You are given a single line string. Your task is to invert the case for each alphabetical character in the string. In other words, every lowercase letter in the input should be converted to uppercase, and every uppercase letter should be converted to lowercase. All non-alphabetic characters should remain unchanged.
Input: The input will consist of a single line read from standard input (stdin).
Output: Output the modified string to standard output (stdout), where the case of each alphabetic character has been inverted.
For example, if the input is Hello, World!, the output should be hELLO, wORLD!.
Note: Use \LaTeX
format for any formulas if needed. In this problem, the functionality is straightforward string manipulation.
inputFormat
The input consists of a single string s
provided as a single line from stdin. The string can contain letters, digits, spaces, and symbols.
outputFormat
Output a single string where each alphabetical character’s case has been inverted compared to the input. The result should be printed to stdout.
## sampleHello, World!
hELLO, wORLD!