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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!