Answer the question
In order to leave comments, you need to log in
How to change error: "Index is out of array bound"?
Please help fix the problem with the EnterMatrix method.
Exactly at:MATRIX[j, k] = int.Parse(Console.ReadLine());
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
class Matrix {
int row, column;
int[,] MATRIX;
public int ROW {
get { return row; }
set { row = value; }
}
public int COLUMN {
get { return column; }
set { column = value; }
}
public Matrix() {
}
public Matrix(int row, int column) {
this.row = ROW;
this.column = COLUMN;
MATRIX = new int[this.COLUMN, this.ROW];
}
public void EnterMatrix() {
Console.Write("Enter the numbers of matrix columns: ");
COLUMN = int.Parse(Console.ReadLine());
Console.Write("Enter the numbers of matrix rows: ");
ROW = int.Parse(Console.ReadLine());
for (int j = 0; j < COLUMN; j++) {
for (int k = 0; k < ROW; k++) {
Console.Write("For matrix cell -> " + (j + 1) + ":" + (k + 1) + " - ");
MATRIX = new int[j, k];
MATRIX[j, k] = int.Parse(Console.ReadLine());
}
}
}
public void DisplayMatrix() {
Console.Write("The matrix is: ");
for (int j = 0; j < COLUMN; j++) {
for (int k = 0; k < ROW; k++) {
Console.WriteLine("{0}\t", MATRIX[j, k]);
}
}
}
~Matrix() {
Console.WriteLine("Matrix has been denied.");
}
}
class Vector : Matrix {
public Vector(int row, int column) {
}
~Vector() {
Console.WriteLine("Vector has been denied.");
}
}
class Program {
static void Main() {
Matrix MATRIX = new Matrix();
MATRIX.EnterMatrix();
MATRIX.DisplayMatrix();
}
}
Answer the question
In order to leave comments, you need to log in
MATRIX = new int[j, k];
MATRIX[j, k] = int.Parse(Console.ReadLine());
Console.Write("Enter the numbers of matrix columns: ");
COLUMN = int.Parse(Console.ReadLine());
Console.Write("Enter the numbers of matrix rows: ");
ROW = int.Parse(Console.ReadLine());
MATRIX = new int[COLUMN, ROW];
https://docs.microsoft.com/en-us/dotnet/csharp/pro...
See 5th point
change the addressing at home, the networks at home and in the office should be different.
This is not so important, in most vpn clients it is possible to use the gateway of the vpn server, in the windows client, something like the properties of the vpn connection - network - a tick on "use the default gateway"
The problem in any case is the intersection of networks. Either in the office or at home, you need to change the subnet. By the way, I highly recommend unchecking the "use the default gateway on the remote network" checkbox, otherwise a torrent launched at someone's home will set the office channel to zero, and given how you have a router, also the piece of iron itself.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question