Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace NxNMatrix
- {
- class Program
- {
- static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- string print = "";
- Console.WriteLine(NxNMatrix(n, print));
- }
- static string NxNMatrix(int n, string print)
- {
- for (int i = 0; i < n; i++)
- {
- for (int j = 0; j < n; j++)
- {
- print += $"{n} ";
- }
- print += '\n';
- }
- return print;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement