Knaph

First Contact4 of 62

Account Balance

Read a starting balance and a deposit (which may be negative, for a withdrawal) as two integers from standard input. Declare balance with := or var, then reassign it by adding deposit — the same variable, updated in place, not a new one. Print the resulting balance.

Sign in to try this exercise.