I have an assigment that i cant solve it , can any one help ?

Here is it :

....................

Write a C++ program that calculates the interest for a customer’s money at a bank account. If the customer deposit is 6000 JD or less, the bank gives an interest of 3% if the customer kept his/her money in the back for a period of 2 years or longer. 2% only will be given as interest for the customer if he / she kept the money for a period of one year.
If the deposit is more than 6000 JD up to 9000 JD, the bank gives 4% if the customer kept the money for a period of 1 year and 5% if the period is 2 years. If the customer’s deposit is more than 9000 JD and up to 15,000 JD, the bank gives 6% interest if the period is 1 year and 7% if the period is 2 years.
If the deposit is more than 15000 JD, the bank gives 8% interest if the period is 1 year and 9% if the period is 2 years.
The program reads the deposited amount of money and the period for which it kept in the bank. From these two entries, the program should prints the total amount of money available at the bank after the added interest. You must use switch and if statements in your solution.

......................

## Recommended Answers

Which part is giving you a problem?

Honesty is always a good policy. So, I'm sorry, but the answer is no. Please see the homework policy at the top of this board.

## All 5 Replies

Which part is giving you a problem?

I want the whole solution of the program please .

Honesty is always a good policy. So, I'm sorry, but the answer is no. Please see the homework policy at the top of this board.

Ok, but honestly you are not helping at all.

OK, here is a little help to get you statrted. First of all, you need to put the problem into some kind of structure so that you can code it. Let's start with the input which consists of two pieces of data: the dollar amount and the time of investment.

Cin << dollar amount
Cin << time of investment

The rules:

0 - 6,000 . . . . 6,001 - 9,000 . . . . 9,001 - 15,000 . . . . 15,000 --->
------------ . . . . ----------------- . . . . -------------------- . . . .----------------
1 year 2% . . . . 1 year 4% . . . .. . . 1 year 6% . . . . . . . . 1 year 8%
2 year 3% . . . . 2 year 5% . . . . .. . 2 year 6% . . .. . . . . .2 year 9%

The output:
cout << dollar amount + accrued interest.

Now that you have the problem clearly stated before you, it should be much easier to see how you need to code it. For example, you can see that you have 4 catagories, each with 2 catagories within. Always spend some time understanding the problem the best you can first, then code it (as opposed to just sitting there and staring at it).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.