Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace _06.Challenge_The_Wedding
- {
- class Program
- {
- static void Main(string[] args)
- {
- //1. Read Input
- int menCount = int.Parse(Console.ReadLine());
- int womenCount = int.Parse(Console.ReadLine());
- int maxTables = int.Parse(Console.ReadLine());
- //2. Manipulate Data
- for (int i = 1; i <= menCount; i++)
- {
- for (int j = 1; j <= womenCount; j++)
- {
- maxTables--;
- if (maxTables >= 0)
- {
- Console.Write($"({i} <-> {j}) ");
- }
- else
- {
- break;
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement