/** * @author (Jakob Kienegger) * @version (27.04.19) */ import java.io.*; import java.util.*; public class Eingabe { public Element[][] matrix; private double multi = 1; private int zeilenZahl; private int spaltenZahl; private double zahl; public Eingabe() { zeilenZahl = 3; spaltenZahl = 4; } public void einlesen() throws IOException { //InputStreamReader isr = null; BufferedReader br = null; matrix = new Element[zeilenZahl][spaltenZahl]; for(int i = 0; i < zeilenZahl; i++) { for(int j = 0; j < spaltenZahl; j++) { try { br = new BufferedReader(new InputStreamReader(System.in)); System.out.print(+ i + "," + j + ": "); String eingabe = br.readLine(); matrix[i][j] = new Element(Integer.parseInt(eingabe)); } catch (IOException e) { e.printStackTrace(); } } } if (br != null) { try { br.close(); } catch (IOException e) { e.printStackTrace(); } } } public void ausgabe() { for(int j=0; ji; j++) { zeilenAddition(i, j); } } } public static void main (String[] args) { Eingabe a = new Eingabe(); //Gauss b = new Gauss(3, 4); try { a.einlesen(); a.gaussAlgorithmus(3, 4); a.ausgabe(); } catch (IOException e) { e.printStackTrace(); } } /* */ }