simeon3000

Magic Letter

May 28th, 2017
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.65 KB | None | 0 0
  1.             char c1 = char.Parse(Console.ReadLine());
  2.             char c2 = char.Parse(Console.ReadLine());
  3.             char c3 = char.Parse(Console.ReadLine());
  4.  
  5.             for (int i = c1; i <= c2; i++)
  6.             {
  7.                 for (int j = c1; j <= c2; j++)
  8.                 {
  9.                     for (int k = c1; k <= c2; k++)
  10.                     {
  11.                         if (i != c3 && j != c3 && k != c3)
  12.                         {
  13.                             Console.Write($"{(char)i}{(char)j}{(char)k} ");                            
  14.                         }
  15.                     }
  16.                 }
  17.             }
  18.             Console.WriteLine();
Advertisement
Add Comment
Please, Sign In to add comment