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 Zadacha6
- {
- class Program
- {
- static void Main(string[] args)
- {
- char startCharacter = char.Parse(Console.ReadLine());
- char endCharacter = char.Parse(Console.ReadLine());
- char withoutCharacter = char.Parse(Console.ReadLine());
- int combinations = 0;
- for (char one = startCharacter; one < endCharacter + 1; one++)
- {
- for (char two = startCharacter; two < endCharacter + 1; two++)
- {
- for (char three = startCharacter; three < endCharacter + 1; three++)
- {
- if (one != withoutCharacter &&
- two != withoutCharacter &&
- three != withoutCharacter)
- {
- Console.Write(one.ToString() +
- two.ToString() +
- three.ToString() + " ");
- combinations = combinations + 1;
- }
- }
- }
- }
- Console.WriteLine(combinations);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement