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 ConsoleApplication1
- {
- class Program
- {
- static void Main(string[] args)
- {
- int firstPlayer = int.Parse(Console.ReadLine());
- int secondPlayer = int.Parse(Console.ReadLine());
- int maxBattles = int.Parse(Console.ReadLine());
- int counter = 0;
- for (int i = 1; i <= firstPlayer; i++)
- {
- for (int j = 1; j <= secondPlayer; j++)
- {
- counter++;
- if (counter > maxBattles)
- {
- break;
- }
- Console.Write("({0} <-> {1}) ", i, j);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment