70. Toggle the Case
Foundation1000 ms256 MBSolved by 0%
Read one line and print it with every letter's case flipped — uppercase becomes lowercase and lowercase becomes uppercase.
Anything that is not a letter is left exactly as it is.
Constraints - The line has between 1 and 100000 characters. - Printable ASCII only.
Input
A single line of text.
Output
Print the line with the case of every letter flipped. Non-letters are unchanged.
InputHello
OutputhELLO
Notehas a mix of cases
InputHello World 123
OutputhELLO wORLD 123
Notecontains digits and spaces that must pass through unchanged
Hint 1Approach
Hint 2Approach
Hint 3Pseudocode
Hint 4Full solution