|
|
@@ -24,14 +24,14 @@ public class Eingabe
|
|
|
|
|
|
//InputStreamReader isr = null;
|
|
|
BufferedReader br = null;
|
|
|
- matrix = new Element[m][n];
|
|
|
- for (int i = 0; i < n; i++) {
|
|
|
- for (int j = 0; j < m; j++) {
|
|
|
+ matrix = new Element[n][m];
|
|
|
+ for(int i = 0; i < n; i++) {
|
|
|
+ for(int j = 0; j < m; 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));
|
|
|
+ matrix[i][j] = new Element(Double.parseDouble(eingabe));
|
|
|
} catch (IOException e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
@@ -48,7 +48,8 @@ public class Eingabe
|
|
|
}
|
|
|
public double faktorCheck(Element zahl)
|
|
|
{
|
|
|
- if(zahl.gibZahl() != 1)
|
|
|
+ int value = (int) zahl.gibZahl();
|
|
|
+ if(value != 1)
|
|
|
{
|
|
|
multi = 1/(zahl.gibZahl());
|
|
|
zahl.multiZahl(multi);
|
|
|
@@ -66,10 +67,10 @@ public class Eingabe
|
|
|
{
|
|
|
for(int i=0; i<n; i++)
|
|
|
{
|
|
|
- this.multi = faktorCheck(matrix[i][a]);
|
|
|
+ multi = faktorCheck(matrix[i][a]);
|
|
|
for(int j=1; j<m; j++)
|
|
|
{
|
|
|
- matrix[i][j].multiZahl(this.multi);
|
|
|
+ matrix[i][j].multiZahl(multi);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -83,14 +84,14 @@ public class Eingabe
|
|
|
{
|
|
|
System.out.print( matrix[j][i].gibZahl() + ", ");
|
|
|
}
|
|
|
-
|
|
|
+ System.out.println("");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
public void gauss() throws IOException
|
|
|
{
|
|
|
- einlesen(m, n);
|
|
|
+ //einlesen(m, n);
|
|
|
zeilenFaktor(0);
|
|
|
for(int j=1; j<3; j++)
|
|
|
{
|
|
|
@@ -142,7 +143,7 @@ public class Eingabe
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
|
|
|
- a.ausgabe();
|
|
|
+ //a.ausgabe();
|
|
|
}
|
|
|
|
|
|
/*
|