You are viewing a single comment's thread. Return to all comments →
Here is my Java8 Code:
public static void bonAppetit(List<Integer> bill, int k, int b) { // Write your code here int total = 0; for(Integer e : bill) { total = total + e; } int anna = total - bill.get(k); anna = anna/2; if(b == anna) System.out.print("Bon Appetit"); else System.out.print(b-anna); }
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 →
Here is my Java8 Code: