Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Microsoft SQL Server 2012 Administration

Authors: Adam Jorgensen, Steven Wort

1st Edition

1118106881, 9781118106884

More Books

Students also viewed these Databases questions