Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class Program
- {
- static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- Matrix(n);
- }
- public static void Matrix(int n)
- {
- int[][] array = new int[n][];
- for (int i = 0; i < array.Length; i++)
- {
- array[i] = new int[n];
- for (int k = 0; k < array.Length; k++)
- {
- array[i][k] = n;
- Console.Write(array[i][k]+ " ");
- }
- Console.WriteLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment