Advertisement
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 _06_Problem
- {
- class Program
- {
- static void Main(string[] args)
- {
- char first = char.Parse(Console.ReadLine());
- char second = char.Parse(Console.ReadLine());
- char stop = char.Parse(Console.ReadLine());
- int count = 0;
- for (char a = first; a <= second; a++)
- {
- for (char b = first; b <= second; b++)
- {
- for (char c = first; c <= second; c++)
- {
- if (a == stop || b == stop || c == stop)
- {
- // do nothing
- }
- else
- {
- // print all kombinations without c
- Console.Write("{0}{1}{2} ", a, b, c);
- count++;
- }
- }
- }
- }
- Console.Write(count);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement