Do the planning and write an algorithm for the following questions. Each problem contain a do loop. When planning your algorithm, decide which type of loop will be best suited to solving the particular problem (pre-test or post-test). If the problem contain a decision to be made, decide whether you’ll use an if statement or a select case statement. You can assume that all the input data for the following questions will be valid.



Peter decided to save money to buy a house. Enter this amount as well as the amount he will be able to save each month. He earns 0.8% interest per month while the amount is less than R70,000 and 0,7% interest per month if the amount is equal to or more that R70,000. The interest is added to the total amount. Calculate how many months he will have to save before he has reached his goal. Display the final amount and the number of months

2 answers

Ok, so what is his goal?

((I'm going to assume R means Rand, as in the South African currency, or you just weren't hitting "$" which is fine, and that's what I'm gonna do, but still considering you do actually mean Rand in which case I will do this over.))

Not only did you not provide enough info, you didn't even give us something to work off of, you'll have to come up with the main basis of the problem yourself.

EXAMPLE. If his goal is R"$"80,000, and all of the months he exceeds his amount,
(lets say he consistently gets R"$"73,000).

(Are you sure it's "0.7%" or "7%"??)

if 0.7%, then it'll be R"$"511
(( R"$"73,000 * 0.007 = 511 ))
and it'll take 13 years, or 156 months.

if 7%, then it'll be R"$"5,110
(( R"$"73,000 * 0.07 = 5,110 ))
and it'll take 1.3 years, or 15 months.

Now, it should be you that does the planning for the algorithm, this person is genuinely screwed if this is what he has going on(considering the R"$"511 a month and the goal for a house, which is usually around R"$"60k to R"$"80k
(going back to considering actual South African home sales, whether you actually screwed up or not I am considering both as I am using the American $ for the money, considering if this was actual ZAR currency, it would be around ZAR850k)

(But I'm just gonna assume your "$" key doesn't work or you weren't hitting it correctly and I highly doubt you are taking IT and asking about algorithms considering house prices and some guy named "Peter", these are grade school computer questions.)
.Do the planning and write an algorithm for the following questions. Each problem contain a do loop. When planning your algorithm, decide which type of loop will be best suited to solving the particular problem (pre-test or post-test). If the problem contain a decision to be made, decide whether you’ll use an if statement or a select case statement. You can assume that all the input data for the following questions will be valid.



Peter decided to save money to buy a house. Enter this amount as well as the amount he will be able to save each month. He earns 0.8% interest per month while the amount is less than R70,000 and 0,7% interest per month if the amount is equal to or more that R70,000. The interest is added to the total amount. Calculate how many months he will have to save before he has reached his goal. Display the final amount and the number of months.