Ask Computer Engineering Expert

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

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M9643345

Have any Question?


Related Questions in Computer Engineering

Does bmw have a guided missile corporate culture and

Does BMW have a guided missile corporate culture, and incubator corporate culture, a family corporate culture, or an Eiffel tower corporate culture?

Rebecca borrows 10000 at 18 compounded annually she pays

Rebecca borrows $10,000 at 18% compounded annually. She pays off the loan over a 5-year period with annual payments, starting at year 1. Each successive payment is $700 greater than the previous payment. (a) How much was ...

Jeff decides to start saving some money from this upcoming

Jeff decides to start saving some money from this upcoming month onwards. He decides to save only $500 at first, but each month he will increase the amount invested by $100. He will do it for 60 months (including the fir ...

Suppose you make 30 annual investments in a fund that pays

Suppose you make 30 annual investments in a fund that pays 6% compounded annually. If your first deposit is $7,500 and each successive deposit is 6% greater than the preceding deposit, how much will be in the fund immedi ...

Question -under what circumstances is it ethical if ever to

Question :- Under what circumstances is it ethical, if ever, to use consumer information in marketing research? Explain why you consider it ethical or unethical.

What are the differences between four types of economics

What are the differences between four types of economics evaluations and their differences with other two (budget impact analysis (BIA) and cost of illness (COI) studies)?

What type of economic system does norway have explain some

What type of economic system does Norway have? Explain some of the benefits of this system to the country and some of the drawbacks,

Among the who imf and wto which of these governmental

Among the WHO, IMF, and WTO, which of these governmental institutions do you feel has most profoundly shaped healthcare outcomes in low-income countries and why? Please support your reasons with examples and research/doc ...

A real estate developer will build two different types of

A real estate developer will build two different types of apartments in a residential area: one- bedroom apartments and two-bedroom apartments. In addition, the developer will build either a swimming pool or a tennis cou ...

Question what some of the reasons that evolutionary models

Question : What some of the reasons that evolutionary models are considered by many to be the best approach to software development. The response must be typed, single spaced, must be in times new roman font (size 12) an ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As