diff --git a/Coding Exercise 5 - Decimal Comparator b/Coding Exercise 5 - Decimal Comparator index c749bac..558c5e7 100644 --- a/Coding Exercise 5 - Decimal Comparator +++ b/Coding Exercise 5 - Decimal Comparator @@ -1,8 +1,12 @@ public class DecimalComparator{ - public static boolean areEqualByThreeDecimalPlaces (double a,double b) { - if((int)a * == b1) - return true; - else - return false; + + public static boolean areEqualByThreeDecimalPlaces(double a, double b){ + + if ((int) (a*1000) == (int) (b*1000) ){ + return true; + } + else{ + return false; + } } }