NedyalkoKikov

FillMatrix

Jun 11th, 2016
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 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 FillMatrix
  8. {
  9. class FillMatrix
  10. {
  11. static void Main()
  12. {
  13. int row = int.Parse(Console.ReadLine());
  14. int[][] matrix = new int[row][];
  15. for (int rows = 0; rows < row; rows++)
  16. {
  17. matrix[rows] = Console.ReadLine().Split().Select(int.Parse).ToArray();
  18. }
  19. foreach(int[] element in matrix)
  20. {
  21. Console.WriteLine(string.Join(" ",element));
  22. }
  23. }
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment