Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class Exercise12Matrix
- {
- static void Main()
- {
- int number = 0;
- int input = int.Parse(Console.ReadLine());
- for (int i = 1; i <= input; i++)
- {
- number = i;
- for (int a = 0; a < input; a++)
- {
- Console.Write(Convert.ToString(number++).PadLeft((Convert.ToString(input + input - 1).Length + 1), ' '));
- }
- Console.WriteLine(Environment.NewLine);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement