Advertisement
Gillito

Untitled

Jun 3rd, 2015
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.74 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApplication26
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             string usrString = Console.ReadLine();
  14.             string tempString = "";
  15.  
  16.             foreach (char i in usrString)
  17.             {
  18.                 if (char.IsLetter(i))
  19.                 {
  20.                     if (char.IsLower(i))
  21.                         tempString += char.ToUpper(i);
  22.                     else
  23.                         tempString += char.ToLower(i);
  24.                 }
  25.             }
  26.             Console.WriteLine(tempString);
  27.             Console.ReadLine();
  28.         }
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement