MuffinMonster

Class Task 56#

Mar 10th, 2014
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.60 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace ConsoleApplication1
  7. {
  8.     class Program
  9.     {
  10.         static string WierdFlip(string st)
  11.         {
  12.             string st2 = "";
  13.             for (int i = 0; i < st.Length - 1; i += 2)
  14.             {
  15.                 st2 += st[i + 1];
  16.                 st2 += st[i];
  17.             }
  18.             return st2;
  19.         }
  20.         static void Main(string[] args)
  21.         {
  22.             string st = Console.ReadLine();
  23.             Console.Write(WierdFlip(st));
  24.             Console.ReadLine();
  25.         }
  26.     }
  27. }
Add Comment
Please, Sign In to add comment