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 Battles
- {
- class Program
- {
- static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- int m = int.Parse(Console.ReadLine());
- int maxBattle = int.Parse(Console.ReadLine());
- var battleCount = 0;
- for (int i = 1; i <= n; i++)
- {
- for (int j = 1; j <= m; j++)
- {
- battleCount++;
- if (battleCount > maxBattle)
- {
- break;
- }
- Console.Write("({0} <-> {1}) ", i, j);
- }
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment