Advertisement
Guest User

Untitled

a guest
Feb 29th, 2020
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.11 KB | None | 0 0
  1. using System;
  2.  
  3. namespace exam
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int firstNumber = int.Parse(Console.ReadLine());
  10.             int secondNumber = int.Parse(Console.ReadLine());
  11.             int thirdNumber = int.Parse(Console.ReadLine());
  12.  
  13.  
  14.             for (int x1 = 1; x1 <= firstNumber; x1++)
  15.             {
  16.                 for (int x2 = 2; x2 <= secondNumber; x2++)
  17.                 {
  18.                    
  19.                     for (int x3 = 1; x3 <= thirdNumber; x3++)
  20.                     {
  21.                         if (x1 % 2 == 0 && x3 % 2 == 0)
  22.                         {
  23.                             if (x2 > 2 && x2 % 2 == 0)
  24.                             {
  25.                                 continue;
  26.                             }
  27.                             else if (x2 >7)
  28.                             {
  29.                                 continue;
  30.                             }
  31.                             Console.WriteLine($"{x1} {x2} {x3}");
  32.  
  33.                         }
  34.                     }
  35.                 }
  36.             }
  37.  
  38.         }
  39.     }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement