Advertisement
koksibg

Fights

Nov 20th, 2016
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.80 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 Fights
  8. {
  9.     class Fights
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int firstPokemon = int.Parse(Console.ReadLine());
  14.             int secondPokemon = int.Parse(Console.ReadLine());
  15.             int maxFight = int.Parse(Console.ReadLine());
  16.             for (int i = 1; i <= firstPokemon; i++)
  17.             {
  18.                 for (int j = 1; j <= secondPokemon; j++)
  19.                 {
  20.                     if ((i * j <= maxFight))
  21.                     {
  22.                         Console.Write($"({i} <-> {j})  ");
  23.                     }
  24.                     else break;
  25.                 }
  26.             }
  27.             Console.WriteLine();
  28.         }
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement