CJCoding With Joseph
15free / daySign inCreate account

Withdraw From Balance

Read an account balance and then an amount to withdraw, both whole dollars. When the amount is larger than the balance print Insufficient funds; otherwise take the amount off the balance and print the new balance in the form Balance: <value>. Input: two lines, the balance then the amount, each an integer, no prompts. Output: one line. The refusing branch is written; add the else branch with its two lines.

Expected Output:

Balance: 70

= newline. The output ends with a newline — print one after the last line.

Hints2 available
Topics:
If Statements
📥 Auto-Input:
100\n30\n
This input is automatically fed to your program's stdin
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (pr, inp, def)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.