Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- namespace Matrix
- {
- class Program
- {
- static void Main(string[] args)
- {
- int rows = int.Parse(Console.ReadLine());
- int cols = int.Parse(Console.ReadLine());
- int[,] matrix = new int[rows, cols];
- for ( int row = 0; row < rows; row ++)
- {
- int[] currentRow = Console.ReadLine().Split(" ", StringSplitOptions.RemoveEmptyEntries).Select(int.Parse).ToArray();
- for (int col = 0; col < cols; col++)
- {
- matrix[row, col] = currentRow[col];
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement