Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ChallengeTheWedding
- {
- class Program
- {
- static void Main(string[] args)
- {
- int menCount = int.Parse(Console.ReadLine());
- int womenCount = int.Parse(Console.ReadLine());
- int tables = int.Parse(Console.ReadLine());
- for (int i = 1; i <= menCount; i++)
- {
- for (int k = 1; k <= womenCount; k++)
- {
- if (tables == 0)
- {
- break;
- }
- else
- {
- Console.Write($"({ i} <-> { k}) ");
- tables--;
- }
- }
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment