Advertisement
skipter

C# Fundamentals - Magic Letters Combinations

Jun 3rd, 2017
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.70 KB | None | 0 0
  1. using System;
  2. class Program
  3. {
  4.     static void Main()
  5.     {
  6.         char firstChar = char.Parse(Console.ReadLine().ToLower());
  7.         char secondChar = char.Parse(Console.ReadLine().ToLower());
  8.         char mustMissThatChar = char.Parse(Console.ReadLine().ToLower());
  9.  
  10.         for (char i = firstChar; i <= secondChar; i++)
  11.         {
  12.             for (char j = firstChar; j <= secondChar; j++)
  13.             {
  14.                 for (char k = firstChar; k <= secondChar; k++)
  15.                 {
  16.                     if (!(i == mustMissThatChar || j == mustMissThatChar || k == mustMissThatChar))
  17.                     Console.Write("{0}{1}{2} ", i, j, k);
  18.                 }
  19.             }
  20.         }
  21.     }  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement