1
0
Fork 0

Axel loop update fixes.

pull/1/head
selim 2023-12-27 17:42:22 +01:00
parent 4bb978cede
commit 6b0c7d3ad8
2 changed files with 3 additions and 2 deletions

View File

@ -20,6 +20,7 @@ public class Axel {
while (!stop) { while (!stop) {
try { try {
spr.updateSpreadsheet();
System.out.println(spr); System.out.println(spr);
System.out.println("\nHILFE (Für eine Anleitung.)\n"); System.out.println("\nHILFE (Für eine Anleitung.)\n");
System.out.print("KOMMANDO: "); System.out.print("KOMMANDO: ");

View File

@ -281,7 +281,7 @@ public class Spreadsheet {
for(int r = getRow(startCellName)-1; r<getRow(endCellName); r++) for(int r = getRow(startCellName)-1; r<getRow(endCellName); r++)
for(int c = getCol(startCellName)-1; c<getCol(endCellName); c++) for(int c = getCol(startCellName)-1; c<getCol(endCellName); c++)
if(!cells[r][c].isEmpty()) { if(!cells[r][c].isEmpty()) {
result += Long.parseLong(cells[r][c].getValue()); result += Double.parseDouble(cells[r][c].getValue());
counter++; counter++;
} }
result /= counter; result /= counter;
@ -472,7 +472,7 @@ public class Spreadsheet {
System.out.println("\nEnter zum fortfahren."); System.out.println("\nEnter zum fortfahren.");
cs.nextLine(); cs.nextLine();
}else { }else {
cells[getRow(inputs.get(0)) - 1][getCol(inputs.get(0)) - 1].setFormula(inputs.get(1)); cells[getRow(inputs.get(0))-1][getCol(inputs.get(0))-1].setFormula(inputs.get(1));
System.out.println("\nEnter zum fortfahren."); System.out.println("\nEnter zum fortfahren.");
cs.nextLine(); cs.nextLine();
} }