nikolayneykov

Untitled

Nov 4th, 2018
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.48 KB | None | 0 0
  1. using System;
  2.  
  3. class ChallengeTheWedding
  4. {
  5.     static void Main(string[] args)
  6.     {
  7.         int men = int.Parse(Console.ReadLine());
  8.         int women = int.Parse(Console.ReadLine());
  9.         int tables = int.Parse(Console.ReadLine());
  10.  
  11.         for (int i = 1; tables > 0 && i <= men; i++)
  12.         {
  13.             for (int j = 1; tables > 0 && j <= women; j++, tables--)
  14.             {
  15.                 Console.Write($"({i} <-> {j}) ");
  16.             }
  17.         }
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment