From a31f086ce1260ab833a76b310f066e689c0c51d6 Mon Sep 17 00:00:00 2001
From: "thibault.capt" <thibault.capt@etu.hesge.ch>
Date: Mon, 5 Dec 2022 14:51:06 +0100
Subject: [PATCH] format du print

---
 src/Simplex.java | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/Simplex.java b/src/Simplex.java
index 18f7af2..a7db097 100644
--- a/src/Simplex.java
+++ b/src/Simplex.java
@@ -17,10 +17,9 @@ public class Simplex {
         System.out.println(s + ": ");
         for (int i = 0; i < x; i++) {
             for (int j = 0; j < y; j++) {
-                if (matEcart[i][j] < 0.0)
-                    System.out.printf("%.2f ", matEcart[i][j]);
-                else
-                    System.out.printf(" %.2f ", matEcart[i][j]);
+                System.out.printf(matEcart[i][j] < 0.0 ?
+                        String.format("%.2f ", matEcart[i][j]) :
+                        String.format(" %.2f ", matEcart[i][j]));
             }
             System.out.println();
         }
-- 
GitLab