Worked example
Total planned toll charges: 20
Inputs
- Planned crossing charges in chronological order: 5,10,5
- Current toll account balance: 12
- Required ending balance: 5
One account, no pending transactions; all crossings charged exactly as entered.
Currency changes the labels, not the amounts. No exchange-rate conversion.
Sum supplied crossing charges.
Add desired ending balance to charges and subtract current balance.
Find the first cumulative charge above current balance; zero means none.
One account, no pending transactions; all crossings charged exactly as entered. Top-up timing is the first crossing index whose cumulative cost exceeds available balance.
OpenStax: Solve proportions and their applications ↗Total planned toll charges: 20
Total planned toll charges: 20