Advertisement
Guest User

Untitled

a guest
Feb 17th, 2019
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. using System;
  2. using System.Linq;
  3.  
  4. namespace methods_7
  5. {
  6. class Program
  7. {
  8. static void Main(string[] args)
  9. {
  10. int number = int.Parse(Console.ReadLine());
  11.  
  12. Matrix(number);
  13. }
  14.  
  15. private static void Matrix(int num)
  16. {
  17. for (int i = 1; i <= num; i++)
  18. {
  19. string num1 = num.ToString();
  20.  
  21. char a = num1.ToCharArray()[0];
  22. string name = new string(a, num);
  23. Console.WriteLine(string.Concat(Enumerable.Repeat(name +" ",num/2)));
  24.  
  25.  
  26. //string space = " ";
  27. // Console.WriteLine($"{name} ");
  28. }
  29. }
  30. }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement