
Write the loan tool's pricing rules with if/else chains and a switch: late fee bands, credit tier codes and payment method fees.
Write the savings planner's loops: a while loop to a goal, a for loop that skips fee-free days, a review loop that always runs once, and a search for the first overdraft month.
Simulate a loan month by month and search for the smallest payment that clears it within a term, using early returns from nested loops.
Simulate a customer's loan from a credit score: pick the tier rate, run the monthly schedule with skipped payments, total what is paid, and search for the payment that clears the loan in time.