Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is c code. please only use stdio.h Compound interest is interest calculated on both the principal amount and the accumulated interest. The total amount

This is c code. please only use stdio.h

Compound interest is interest calculated on both the principal amount and the accumulated interest. The total amount accumulated after period k is computed as:

Ak = (1 + p)*(Ak-1) + d

Where:

p is the interest percentage earned every period, for example input should write 0.03 which represent 3% (input 3 would represent 300%) interest.

d is the amount deposited every period

Ak-1 is the total amount accumulated after the k-1th period

A0 is the initial deposited amount

Write a recursive function that takes as input the interest percentage, the initial and periodical deposit amounts, and the number of periods and returns the amount accumulated by the given time span.

Write a program that asks the user to enter 4 values separate by space for the initial deposit, the regular deposit, the interest percentage per period and the number of periods and uses the function above to print out the corresponding accumulated amount after the time span.

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

Beginning VB.NET Databases

Authors: Thearon Willis

1st Edition

1594864217, 978-1594864216

More Books

Students also viewed these Databases questions

Question

1. Explain how business strategy affects HR strategy.

Answered: 1 week ago