Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Exam
- {
- class Program
- {
- static void Main(string[] args)
- {
- int howManyMen = int.Parse(Console.ReadLine());
- int howManyWomen = int.Parse(Console.ReadLine());
- int maxTables = int.Parse(Console.ReadLine());
- int counter = 0;
- for(int i = 1; i <= howManyMen; i++)
- {
- for(int j=1; j <= howManyWomen; j++)
- {
- Console.Write($"({i} <-> {j}) ");
- counter++;
- if (counter >= maxTables)
- {
- return;
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement