' Get the starting balance PRINT "What is the starting balance" INPUT BALANCE ' ' Determine transaction type PRINT "Type a 'D' for a deposit or a 'C' for a check" INPUT TYPE$ ' IF TYPE$ = "D" THEN Process a deposit. ELSE Process a check. END IF Print the new balance. END
If the user types a 'D' the test TYPE$ = "D" will be true and the true branch will be done.
However, if the user types anything other than a 'D' the test will be false and the false branch will be done. This is not a very good feature. In fact, the program is "user UN-friendly" because slight user errors are not caught. There are ways to improve the program, but to keep things simple let us keep the program as it is.
Next you must flesh-out the task Process a deposit. For this, the program should:
The deposit amount should be kept in a numeric variable.
Write three statements that complete this task.