Skip to main content

Practice ยท 3 of 3

Running Balance

Given the Txn model in scope, implement int after_balance(const Txn *txs, int n, int start) returning start plus every transaction's cents (expenses are negative cents).

Difficulty: beginner

Back to lesson: Practice: Decomposition Drill