Advertisement
dakata

BattleOfThePokemons

Nov 27th, 2016
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.79 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Battles
  8. {
  9.     class Program
  10.     {
  11.         static void Main()
  12.         {
  13.             var firstPokemon = byte.Parse(Console.ReadLine());
  14.             var secondPokemon = byte.Parse(Console.ReadLine());
  15.             var max = byte.Parse(Console.ReadLine());
  16.  
  17.             byte count = 0;
  18.  
  19.             for (int i = 1; i <= firstPokemon; i++)
  20.             {
  21.                 for (int j = 1; j <= secondPokemon; j++)
  22.                 {
  23.                     if (count < max)
  24.                     {
  25.                         ++count;
  26.                         Console.Write("({0} <-> {1}) ", i, j);
  27.                     }
  28.                 }
  29.             }
  30.         }
  31.     }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement