Advertisement
Guest User

Untitled

a guest
Jan 20th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Zadacha6
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. char startCharacter = char.Parse(Console.ReadLine());
  14. char endCharacter = char.Parse(Console.ReadLine());
  15. char withoutCharacter = char.Parse(Console.ReadLine());
  16. int combinations = 0;
  17.  
  18. for (char one = startCharacter; one < endCharacter + 1; one++)
  19. {
  20. for (char two = startCharacter; two < endCharacter + 1; two++)
  21. {
  22. for (char three = startCharacter; three < endCharacter + 1; three++)
  23. {
  24. if (one != withoutCharacter &&
  25. two != withoutCharacter &&
  26. three != withoutCharacter)
  27. {
  28. Console.Write(one.ToString() +
  29. two.ToString() +
  30. three.ToString() + " ");
  31. combinations = combinations + 1;
  32. }
  33. }
  34. }
  35. }
  36.  
  37. Console.WriteLine(combinations);
  38. }
  39. }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement