Instead, have a variable "total" and do "total-num1" when you withdraw. The easy way: if it's not 20, call "continue;" and restart the loop so the user has to input his choice again. Download c-atm-console-app. This helps so that the data can pass in, re-used and manipulated across various functions.
Sharing this code will give me an idea where I can improve and how much positive feedback is there. Divide and conquer is key technique when developing large applications. However, I did this code for someone class project which didn't take me long to finish and their was good remarks.
This technique is useful for debugging, organizing and sharing "the work" between various functions.