Advertisement
Guest User

Untitled

a guest
Mar 1st, 2017
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.66 KB | None | 0 0
  1.             var pokemon = int.Parse(Console.ReadLine());
  2.             var pokemon2 = int.Parse(Console.ReadLine());
  3.             var max = int.Parse(Console.ReadLine());
  4.             var count=0;
  5.             for (int a = 1; a <= pokemon2; a++)
  6.             {
  7.                 for (int b = 1; b <= pokemon2; b++)
  8.                 {
  9.                     count++;
  10.                
  11.                     if(count>=max)
  12.                     {
  13.                         Console.WriteLine();
  14.                         return;
  15.                     }
  16.  
  17.                     Console.Write("({0} <-> {1}) ",a,b);
  18.                 }
  19.                
  20.             }
  21.             Console.WriteLine();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement