Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions Coding Exercise 5 - Decimal Comparator
Original file line number Diff line number Diff line change
@@ -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;
}
}
}