Advertisement
Guest User

Untitled

a guest
Dec 13th, 2014
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.21 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. using System.Threading;
  7.  
  8. namespace charsequense
  9. {
  10.     class Program
  11.     {
  12.         static void Main(string[] args)
  13.         {
  14.             StringBuilder str = new StringBuilder();
  15.             List<Char> charList = new List<char>();
  16.             charList.Add('\0');
  17.             for (int i = (int)'a'; i <= (int)'z'; i++)
  18.             {
  19.                 charList.Add((char)i);
  20.             }
  21.            
  22.             foreach (var item in charList)
  23.             {
  24.                 str.Append(item);
  25.                 foreach (var item1 in charList)
  26.                 {
  27.                     str.Append(item1);
  28.                     foreach (var item2 in charList)
  29.                     {
  30.                         if (item2 == '\0') continue;
  31.                         str.Append(item2);
  32.                         Console.WriteLine(str);
  33.                         str.Remove(2, 1);
  34.                        // Thread.Sleep(1);
  35.                     }
  36.                     str.Remove(1, 1);
  37.                 }
  38.                 str.Remove(0, 1);
  39.             }
  40.      
  41.             Console.ReadLine();
  42.         }
  43.     }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement