You are viewing a single comment's thread. Return to all comments →
Java 8
bill.remove(k); int actual = bill.stream().mapToInt(Integer::intValue).sum() / 2; if(actual == b){ System.out.println("Bon Appetit"); } else { int refund = b - actual; System.out.println(refund); }
Seems like cookies are disabled on this browser, please enable them to open this website
Bill Division
You are viewing a single comment's thread. Return to all comments →
Java 8