diff --git a/lab-0/src/Fraction.java b/lab-0/src/Fraction.java index e0b8ed4..8d7e75d 100644 --- a/lab-0/src/Fraction.java +++ b/lab-0/src/Fraction.java @@ -161,7 +161,7 @@ public class Fraction { */ public String decimal(int digits){ - return String.format("%."+digits, (double)this.numerator / this.denominator); + return String.format("%."+digits+"f", (double)this.numerator / this.denominator); }