Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace Matrix_MxN
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.Write("n=");
- int n = int.Parse(Console.ReadLine());
- Console.Write("m=");
- int m = int.Parse(Console.ReadLine());
- int[,] Matrix = new int[n, m];
- for (int i = 0; i < n; i++)
- {
- for (int j = 0; j < m; j++)
- {
- Console.WriteLine("Matrix[{0},{1}]", i, j);
- Matrix[i, j] = int.Parse(Console.ReadLine());
- }
- }
- for (int i = 0; i < n; i++)
- {
- for (int j = 0; j < m; j++)
- {
- Console.Write(Matrix[i, j] + " ");
- }
- Console.WriteLine(" ");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement