Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * KK KK JJJJJJJJJJ BBBBBBBB
- * KK KK JJ BB BB
- * KKKK JJ BBBBBBBB
- * KK KK JJ JJ BB BB
- * KK KK JJJJJJ BBBBBBBBBB
- *
- * Copyright 2018 Jordy Van Kerkvoorde
- */
- package h7;
- import java.util.Scanner;
- /**
- *
- * @author KeeJayBe
- */
- public class Matrix {
- public static void main(String[] args) {
- Scanner s = new Scanner(System.in);
- int[][] matrix = new int[2][2];
- for(int i=0 ; i<=1; i++){
- for(int j=0; j<=1; j++){
- System.out.println("Geef een getal voor de rij" + (i + 1) + "kolom " + (j+1) +": ");
- int get = s.nextInt();
- matrix[i][j] = get;
- }
- }
- int det = (matrix[0][0] * matrix [1][1]) - (matrix[0][1] * matrix[1][0]);
- System.out.println("De determinant is: " + det);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement