Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Disclaimer: The creator of 'C# Shell (C# Offline Compiler)' is in no way responsible for the code posted by any user.
- using System;
- using System.IO;
- using System.Linq;
- using System.Collections.Generic;
- namespace CSharp_Shell
- {
- public class Program
- {
- public static void Main()
- {
- var size = Console.ReadLine().Split().Select(int.Parse).ToArray();
- var matrix = new int[size[0], size[1]];
- for (int r = 0; r < size[0]; r++)
- {
- var row = Console.ReadLine().Split().Select(int.Parse).ToArray();
- for (int c = 0; c < size[1]; c++)
- {
- matrix[r, c] += row[c];
- }
- }
- foreach (var item in matrix)
- {
- Console.Write(item);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement