Problem:
Toggling Cases

Write a program which converts uppercase/lowercase letters to lowercase/uppercase for a given string.

Input

A string is given in a line.

Output

Print the converted string in a line. Note that you do not need to convert any characters other than alphabetical letters.

Constraints

The length of the input string < 1200

Sample Input

fAIR, LATER, OCCASIONALLY CLOUDY.

Sample Output

Fair, later, occasionally cloudy.

Solution in C# (judge verdict: Accepted)

using System;
class change{
    public static void Main(){
        String str = Console.ReadLine();
        foreach(char c in str){
            switch(c){
                case'a':
                    Console.Write("A");
                    break;
                case'b':
                    Console.Write("B");
                    break;
                case'c':
                    Console.Write("C");
                    break;
                case'd':
                    Console.Write("D");
                    break;
                case'e':
                    Console.Write("E");
                    break;
                case'f':
                    Console.Write("F");
                    break;
                case'g':
                    Console.Write("G");
                    break;
                case'h':
                    Console.Write("H");
                    break;
                case'i':
                    Console.Write("I");
                    break;
                case'j':
                    Console.Write("J");
                    break;
                case'k':
                    Console.Write("K");
                    break;
                case'l':
                    Console.Write("L");
                    break;
                case'm':
                    Console.Write("M");
                    break;
                case'n':
                    Console.Write("N");
                    break;
                case'o':
                    Console.Write("O");
                    break;
                case'p':
                    Console.Write("P");
                    break;
                case'q':
                    Console.Write("Q");
                    break;
                case'r':
                    Console.Write("R");
                    break;
                case's':
                    Console.Write("S");
                    break;
                case't':
                    Console.Write("T");
                    break;
                case'u':
                    Console.Write("U");
                    break;
                case'v':
                    Console.Write("V");
                    break;
                case'w':
                    Console.Write("W");
                    break;
                case'x':
                    Console.Write("X");
                    break;
                case'y':
                    Console.Write("Y");
                    break;
                case'z':
                    Console.Write("Z");
                    break;
                case'A':
                    Console.Write("a");
                    break;
                case'B':
                    Console.Write("b");
                    break;
                case'C':
                    Console.Write("c");
                    break;
                case'D':
                    Console.Write("d");
                    break;
                case'E':
                    Console.Write("e");
                    break;
                case'F':
                    Console.Write("f");
                    break;
                case'G':
                    Console.Write("g");
                    break;
                case'H':
                    Console.Write("h");
                    break;
                case'I':
                    Console.Write("i");
                    break;
                case'J':
                    Console.Write("j");
                    break;
                case'K':
                    Console.Write("k");
                    break;
                case'L':
                    Console.Write("l");
                    break;
                case'M':
                    Console.Write("m");
                    break;
                case'N':
                    Console.Write("n");
                    break;
                case'O':
                    Console.Write("o");
                    break;
                case'P':
                    Console.Write("p");
                    break;
                case'Q':
                    Console.Write("q");
                    break;
                case'R':
                    Console.Write("r");
                    break;
                case'S':
                    Console.Write("s");
                    break;
                case'T':
                    Console.Write("t");
                    break;
                case'U':
                    Console.Write("u");
                    break;
                case'V':
                    Console.Write("v");
                    break;
                case'W':
                    Console.Write("w");
                    break;
                case'X':
                    Console.Write("x");
                    break;
                case'Y':
                    Console.Write("y");
                    break;
                case'Z':
                    Console.Write("z");
                    break;
                default:
                    Console.Write(c);
                    break;
            }
        }
        Console.WriteLine();
    }
}