#C1952. Case Alternating String Transformation
Case Alternating String Transformation
Case Alternating String Transformation
This problem requires you to transform a given string by alternating the case of each alphabetic character. The first alphabetic character should be converted to uppercase, the second to lowercase, the third to uppercase, and so on. Non-alphabetical characters should remain unchanged.
For example:
- If the input is "hello", the output should be "HeLlO".
- If the input is "world!", the output should be "WoRlD!".
Apply the transformation and output the resulting string.
inputFormat
The input consists of a single line containing a string. The string may include alphabetic characters, digits, spaces, or punctuation.
outputFormat
Output a single line: the transformed string where the cases of the alphabetic characters alternate, starting with uppercase for the first alphabetic character.
## samplehello
HeLlO