Skip to main content

Practice · 3 of 3

Running Balance

CHALLENGE
Difficulty: beginner+25 XP

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).

Back to lesson: Practice: Decomposition Drill