SHARE
TWEET

Exercise12Matrix

g-stoyanov Dec 3rd, 2012 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2.  
  3. class Exercise12Matrix
  4. {
  5.     static void Main()
  6.     {
  7.         int number = 0;
  8.         int input = int.Parse(Console.ReadLine());
  9.         for (int i = 1; i <= input; i++)
  10.         {
  11.             number = i;
  12.             for (int a = 0; a < input; a++)
  13.             {
  14.                 Console.Write(Convert.ToString(number++).PadLeft((Convert.ToString(input + input - 1).Length + 1), ' '));
  15.             }
  16.             Console.WriteLine(Environment.NewLine);
  17.         }
  18.     }
  19. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top