• + 0 comments
    C# solution

    C# * public static void bonAppetit(List bill, int NoEat, int charged) * { * //remove item that she doesn't it from bill list * bill.RemoveAt(NoEat); * //sum the bill and minus the amount charged * int refund = (charged - (bill.Sum()/2)); * //do simple if else then in console.write IF balance is 0, write Bon Appetit else write refund * Console.Write(refund == 0 ? "Bon Appetit": refund); * }