anizko

01. Matrix

Apr 19th, 2019
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.00 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.  
  14.            for(int i =a;i<=b;i++)
  15.             {
  16.                 for (int j = a; j <= b; j++)
  17.                 {
  18.                     for (int n = c; n <= d; n++)
  19.                     {
  20.                         for (int m = c; m <= d; m++)
  21.                         {
  22.                             if(i!=j&&n!=m&&i+m==j+n)
  23.                             {
  24.                                 Console.WriteLine($"{i}{j}");
  25.                                 Console.WriteLine($"{n}{m}");
  26.                                 Console.WriteLine();
  27.                             }
  28.                         }
  29.                     }
  30.                 }
  31.             }
  32.            
  33.            
  34.  
  35.  
  36.         }
  37.     }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment