Skip to content
Snippets Groups Projects
Commit a31f086c authored by thibault.capt's avatar thibault.capt
Browse files

format du print

parent 8ee7a1e6
Branches
No related tags found
No related merge requests found
...@@ -17,10 +17,9 @@ public class Simplex { ...@@ -17,10 +17,9 @@ public class Simplex {
System.out.println(s + ": "); System.out.println(s + ": ");
for (int i = 0; i < x; i++) { for (int i = 0; i < x; i++) {
for (int j = 0; j < y; j++) { for (int j = 0; j < y; j++) {
if (matEcart[i][j] < 0.0) System.out.printf(matEcart[i][j] < 0.0 ?
System.out.printf("%.2f ", matEcart[i][j]); String.format("%.2f ", matEcart[i][j]) :
else String.format(" %.2f ", matEcart[i][j]));
System.out.printf(" %.2f ", matEcart[i][j]);
} }
System.out.println(); System.out.println();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment