Swap case: uppercase → lowercase and lowercase → uppercase.
Difficulty: Easy
Phase: 5 · Strings
XP Reward: 10 XP
Topics: Strings, Easy
Supported Languages: Python, JavaScript, C, C++, Java
Problem Description
Swap case of each letter: uppercase to lowercase, and lowercase to uppercase. Input Format: Read input from standard input (stdin). Output Format: Print the result to standard output (stdout).
Constraints
- -10^9 <= N <= 10^9
Examples
Example 1
Input: Hello World
Output: hELLO wORLD
Explanation: Sample execution for input Hello World