public static void Main()
var startBalance = 100.0;
int[] attemptedWithdrawals = {20, 10, 40, 50, 10, 70, 30};
var endBalance = attemptedWithdrawals.Aggregate(startBalance, (balance, nextWithdrawal) => nextWithdrawal <= balance ? balance - nextWithdrawal : balance);
Console.WriteLine("Ending balance: {0}", endBalance);