Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- namespace methods_7
- {
- class Program
- {
- static void Main(string[] args)
- {
- int number = int.Parse(Console.ReadLine());
- Matrix(number);
- }
- private static void Matrix(int num)
- {
- for (int i = 1; i <= num; i++)
- {
- string num1 = num.ToString();
- char a = num1.ToCharArray()[0];
- string name = new string(a, num);
- Console.WriteLine(string.Concat(Enumerable.Repeat(name +" ",num/2)));
- //string space = " ";
- // Console.WriteLine($"{name} ");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement