NedyalkoKikov

FillMatrix

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