Advertisement
Guest User

бабиОнли

a guest
Nov 16th, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.77 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 FirstDemoLovech
  8. {
  9.     public class Program
  10.     {
  11.         public static void Main()
  12.         {
  13.             int men = int.Parse(Console.ReadLine());
  14.             int women = int.Parse(Console.ReadLine());
  15.             int maxTables = int.Parse(Console.ReadLine());
  16.             int currentTable = 0;
  17.             for (int m = 1; m <= men; m++)
  18.             {
  19.                 for (int w = 1; w <= women; w++)
  20.                 {
  21.                     Console.Write($"({m} <-> {w}) ");
  22.                     currentTable++;
  23.                     if (currentTable == maxTables) return;
  24.                 }
  25.             }
  26.  
  27.            
  28.         }
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement