Question: Question #5. Write a script that creates a variable called BALANCE that is assigned the value 100.00. Then prompt the user to enter an amount
Question #5. Write a script that creates a variable called BALANCE that is assigned the value 100.00. Then prompt the user to enter an amount to withdraw. Store that amount in a variable called WITHDRAW. Use an if/else construct to display a message to the user stating whether the withdrawal was successful. If the withdrawal would result in a negative balance, state that the withdrawal was not successful. Otherwise, state that the withdrawal was successful, and display the updated balance. Command Window Output: Please enter an amount to withdraw: 100.01 $100.01 withdrawal would produce a negative balance. Please enter an amount to withdraw: 99.99 Withdrawal Successful. Balance now $0.01
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
