Advertisement
Daten

06. Special Combinations

Mar 12th, 2018
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.86 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 Special_Combinations
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int n = int.Parse(Console.ReadLine());
  14.             int m = int.Parse(Console.ReadLine());
  15.             int s = int.Parse(Console.ReadLine());
  16.  
  17.             for (int i = 1; i <= n; i++)
  18.             {
  19.                 for (int j = 1; j <= m; j++)
  20.                 {
  21.                     for (int k = 1; k <= s; k++)
  22.                     {
  23.                         if (k % 2 == 0 && i % 2 == 0 && (j == 2 || j == 3 || j == 5 || j == 7))
  24.                         {
  25.                         Console.WriteLine("{0} {1} {2}", i, j, k);
  26.                         }
  27.                     }
  28.                 }
  29.             }
  30.         }
  31.     }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement