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