Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace LettersCombination
- {
- class Program
- {
- static void Main(string[] args)
- {
- char startLetter = char.Parse(Console.ReadLine());
- char endLetter = char.Parse(Console.ReadLine());
- char exceptLetter = char.Parse(Console.ReadLine());
- var sum = 0;
- for (char first = startLetter; first <= endLetter; first++)
- {
- for (char second = startLetter; second <= endLetter; second++)
- {
- for (char third = startLetter; third <= endLetter; third++)
- {
- if (first != exceptLetter && second != exceptLetter && third != exceptLetter)
- {
- sum++;
- Console.Write("{0}{1}{2} ", first, second, third);
- }
- }
- }
- }
- Console.Write(sum);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement