VelizarAvramov

14. Magic Letter

Nov 9th, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.77 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _14._Magic_Letter
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             char first = char.Parse(Console.ReadLine());
  10.             char second = char.Parse(Console.ReadLine());
  11.             char third = char.Parse(Console.ReadLine());
  12.  
  13.             for (char i = first; i <= second; i++)
  14.             {
  15.                 for (char k = first; k <= second; k++)
  16.                 {
  17.                     for (char m = first; m <= second; m++)
  18.                     {
  19.                         if (i != third && k != third && m != third)
  20.                         {
  21.                             Console.Write($"{i}{k}{m} ");
  22.                         }
  23.                     }
  24.                 }
  25.             }
  26.         }
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment