Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.ComponentModel.DataAnnotations;
- using System.Diagnostics.Tracing;
- using System.Reflection;
- using System.Reflection.Metadata;
- using System.Runtime.ExceptionServices;
- namespace ExercisesForSoftuni
- {
- class Program
- {
- static void Main(string[] args)
- {
- int k = int.Parse(Console.ReadLine());//6
- int l = int.Parse(Console.ReadLine());//7
- int m = int.Parse(Console.ReadLine());//5
- int n = int.Parse(Console.ReadLine());//6
- for (int i = k; i <= 8; i++) // 6
- {
- if (i % 2 == 0)
- {
- for (int j = 9; j >= l; j--) // 9
- {
- if (j % 2 == 1)
- {
- for (int o = m; o <= 8; o++) // 6
- {
- if (o % 2 == 0)
- {
- for (int p = 9; p >= n; p--) // 7
- {
- if (p % 2 == 1)
- {
- if (i % 2 == 0 && j % 2 == 1 && o % 2 == 0 & p % 2 == 1)
- {
- if (i == o && j == p)
- {
- Console.WriteLine($"Cannot change the same player.");
- }
- else
- {
- Console.WriteLine($"{i}{j} - {o}{p}");
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment