5 XP challenge

Update a Balance

very easy
Build it yourself · 3 min
1 Learn2 Predict3 Solve

Task
Your mission

Return starting + received - paid. All inputs are integers from 0 to 100; the final balance may be negative.

Examples

InputReturn
starting = 10, received = 4, paid = 3

balance: 10 → 14 → 11. The result is 11.

11
starting = 0, received = 0, paid = 00

Your code

Write your answer inside Solution, then use return to send it back.

Try examples runs the public examples. Check my code checks your full answer and saves your completion.