tissiana

NxNMatrix

Oct 24th, 2018
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.64 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 NxNMatrix
  8. {
  9.     class Program
  10.     {
  11.         static void Main()
  12.         {
  13.             int n = int.Parse(Console.ReadLine());
  14.             PrintNxNMatrix(n);
  15.            
  16.         }
  17.         public static void PrintNxNMatrix(int n)
  18.         {
  19.             for (int j = 1; j <= n; j++)
  20.             {
  21.                 for (int i = 1; i <= n; i++)
  22.                 {
  23.                     Console.Write(n + " ");                  
  24.                 }
  25.                 Console.WriteLine();
  26.             }
  27.         }
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment