veronikaaa86

14. Magic Letter

Jan 31st, 2018
489
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.90 KB | None | 0 0
  1. namespace Ex14_MagicLetter
  2. {
  3.     using System;
  4.     public class Program
  5.     {
  6.         public static void Main(string[] args)
  7.         {
  8.             char first = char.Parse(Console.ReadLine());
  9.             char second = char.Parse(Console.ReadLine());
  10.             char skip = char.Parse(Console.ReadLine());
  11.  
  12.             for (char i = first; i <= second; i++)
  13.             {
  14.                 for (char j = first; j <= second; j++)
  15.                 {
  16.                     for (char k = first; k <= second; k++)
  17.                     {
  18.                         if (i == skip || j == skip || k == skip)
  19.                         {
  20.                             continue;
  21.                         }
  22.                         else
  23.                         {
  24.                             Console.Write($"{i}{j}{k} ");
  25.                         }
  26.                     }
  27.                 }
  28.             }
  29.         }
  30.     }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment