When someone goes to a bank teller machine the person may


When someone goes to a bank teller machine the person may ask the machine to perform an action from a menu of possible actions. If the user has a savings account and a checking account, write a program to perform one of these tasks as described in the following section.

• Deposit into the savings account 
• Transfer from the savings into the checking account 
• Withdraw from the checking account. 
Name your program bankAccount.c 
2 Specifications 
• There is a Savings and a Checking account. Your program should begin by asking the user to enter the starting amount in the checking and savings accounts. 
• Your program then requests for an action from a menu with 3 possible options: deposit, transfer or withdraw. If the selected option is not available the program states "Entered selection is not available". 
• If the selected option is 1, 2, or 3, depending on the option selected by the user, the program then asks for the appropriate amount related to that request. For example if the withdraw option is selected, the program should ask for the withdraw amount like "Enter withdraw amount:", or for transfer it should prompt "Enter the transfer amount" and so on. 
• If the entered amount is appropriate, the program performs the requested action, and prints the new savings account and checking account balances. If the entered amount is inappropriate, the program prints a message to state "the entered amount is not appropriate 
for the selected task". Appropriate amounts are defined as follows: 
• For a withdraw selection, the amount should be positive and it should be less than the available money in the checking account. 
• For a deposit the amount should be positive. 
• For a transfer, the amount must be positive and not more than the available money in the savings account. 

*****Problem(2)

Write a function which takes a person's salary as input and returns the amount of tax on that salary as its output. Name your function "incometax". Assume that incomes are taxed according to the following: 
1. Those with incomes less than $ 20000 should pay 15 percent of the income. 
2. Those with incomes between $ 20000 and $ 35000, should pay 15 percent on the first $ 20000 and 
20 percent of the amount over $ 20000. 
3. Those with incomes between $ 35000 and $ 50000, should pay 15 percent on the first $ 20000 and 
20 percent on the next $ 15000, and 25 percent of the amount over $ 35000. 
4. Those with incomes between $50000 and $ 1000000, should pay 15 percent on the first $ 20000, 20 percent on the next $ 15000, 25 percent on the next $ 15000, and 30 percent of the amount over $ 50000. 
5. Those with incomes above $ 1000000, should pay 15 percent on the first $ 20000, 20 percent on the next $ 15000, 25 percent on the next $ 15000, 30 percent on the next $ 50000, and 35 percent of any amount over $ 1000000, For example incometax(33000) should return 5600. You must define the appropriate prototype for the function incometax. 

** problem(3)
Write a driver for the function incometax in problem 2. Your driver should be a program that asks for the income as an input from the user, calculates the tax for that income by calling the function incometax., and then prints the result with a message like "The tax on the income of in is tax.". where in is the input and tax is the calculated tax for the input. 
function which takes a person's salary as input and returns the amount of tax on that salary as its

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: When someone goes to a bank teller machine the person may
Reference No:- TGS0135767

Expected delivery within 24 Hours