Advertisement
Guest User

Untitled

a guest
Nov 18th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Matrix
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. int a = int.Parse(Console.ReadLine());
  10. int b = int.Parse(Console.ReadLine());
  11. int c = int.Parse(Console.ReadLine());
  12. int d = int.Parse(Console.ReadLine());
  13. while (true)
  14. {
  15. for (int x1 = a; x1 <= b; x1++)
  16. {
  17. for (int x2 = a; x2 <=b; x2++)
  18. {
  19. for (int x3 = c; x3 <= d; x3++)
  20. {
  21. for (int x4 = c; x4 <= d; x4++)
  22. {
  23. if (x1+x4==x2+x3&&x1!=x2&&x4!=x3)
  24. {
  25. Console.WriteLine($"{x1}{x2}");
  26. Console.WriteLine($"{x3}{x4}");
  27. Console.WriteLine();
  28. }
  29. }
  30. }
  31. }
  32. }
  33.  
  34. }
  35.  
  36. }
  37. }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement