Question
Write the code to implement the following: Prompt the user to enter the amount they wish to withdraw from the bank. Assume there is 100
Write the code to implement the following: Prompt the user to enter the amount they wish to withdraw from the bank. Assume there is 100 in the account. If the user enters a negative amount, inform them that they entered an invalid amount. If the user enters a value higher than 100, inform the user there are not enough funds. If the user enters an invalid numeric value, inform the user as such. If the user enters a valid number between 0 and 100, display the amount of funds left in the account. (100 - amount withdrawn) Example input/output combinations -10 : "Invalid Amount" 20.5 : "Your account has $79.50 remaining" 101 : "Not enough funds in account" kitten : "Invalid Entry"
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started