Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Letters_Combinations
- {
- class Program
- {
- static void Main(string[] args)
- {
- char letterStart = char.Parse(Console.ReadLine());
- char letterEnd = char.Parse(Console.ReadLine());
- char letterMiss = char.Parse(Console.ReadLine());
- int printCount = 0;
- for (char i = letterStart; i <= letterEnd; i++)
- {
- if (i == letterMiss)
- {
- continue;
- }
- for (char j = letterStart; j <= letterEnd; j++)
- {
- if (j == letterMiss)
- {
- continue;
- }
- for (char k = letterStart; k <= letterEnd; k++)
- {
- if (k == letterMiss)
- {
- continue;
- }
- Console.Write("{0}{1}{2} ", i, j, k);
- printCount++;
- }
- }
- }
- Console.Write(printCount);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment