
[C#] 행렬 계산기 (3) - 대리 연산자를 활용하여 함축화
·
제작/기타 프로그램
기본 코드 : //더하기 메소드 static public Matrix Plus(Matrix m1, Matrix m2) { Matrix result; /* 행렬의 크기들을 비교하여 더 작은 행과 열에 맞추어 계산한다. Ex) 1 2 3 3 4 4 6 3 4 5 6 + 1 2 = 5 7 6 7 8 9 7 8 9 */ if(m1.row > m2.row && m1.column > m2.column) { result = PlusMatrix(m1, m2, m2.row, m2.column); } else if(m1.row m2.column) { result = MinusMatrix(m1, m2, m2.row, m2.column); } else if(m1.row m2.column) { result = Calculate..