Advertisement
KeepCoding

P14MagicLetter

Jan 29th, 2018
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.06 KB | None | 0 0
  1. using System;
  2.  
  3. namespace P14MagicLetter
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             char character1 = Console.ReadLine()[0];
  10.             char character2 = char.Parse(Console.ReadLine());
  11.             char exclude = char.Parse(Console.ReadLine());
  12.  
  13.             for (char i = character1; i <= character2; i++)
  14.             {
  15.                 if (i == exclude)
  16.                 {
  17.                     continue;
  18.                 }
  19.  
  20.                 for (char j = character1; j <= character2; j++)
  21.                 {
  22.                     if (j == exclude)
  23.                     {
  24.                         continue;
  25.                     }
  26.  
  27.                     for (char k = character1; k <= character2; k++)
  28.                     {
  29.                         if (k == exclude)
  30.                         {
  31.                             continue;
  32.                         }
  33.  
  34.                         Console.Write($"{i}{j}{k} ");
  35.                     }
  36.                 }
  37.             }
  38.  
  39.             //main ends here
  40.         }
  41.     }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement