using System;
namespace Class1
{
internal class Program
{
//This is the main static function... this is important,
///because it is the core of our program, without it, the program will not work.
static void Main(string[] args)
{
// MATRICES
// Matrices are two-dimensional arrays that store data in rows and columns.
int[,] matrix = new int[3, 3]; // We create a 3x3 integer matrix.
// Entering data into our matrix
for (int i = 0; i < 3; i++) // Rows
{
for (int j = 0; j < 3; j++) // Columns
{
Console.Write($"Enter value for position [{i},{j}]: ");
matrix[i, j] = int.Parse(Console.ReadLine());
}
}
// Printing stored data:
Console.WriteLine();
Console.WriteLine("Matrix Data:");
Console.WriteLine("------------------");
for (int i = 0; i < 3; i++)
{
for (int j = 0; j < 3; j++)
{
Console.Write(matrix[i, j] + "\t"); // Print values in matrix format
}
Console.WriteLine(); // New line after each row
}
Console.WriteLine("------------------");
Console.ReadKey();
}
}
}