Software & Finance Forums

### Author Topic: Turbo C Program to Calculate Continuous Compound Interest  (Read 1497 times)

#### kathir

• Sr. Member
• Posts: 283
##### Turbo C Program to Calculate Continuous Compound Interest
« on: December 29, 2011, 01:27:12 pm »
Here is the Turbo C Program to Calculate Continuous Compound Interest.

The formula is,

FV   =   P * eYr

FV - Future Value
P - Present Value (principal amount)
r - Interest rate
Y - number of years

Code:
```//Source Code Listing

#include <stdio.h>
#include <math.h>

void main()
{
double amount;
double years;
double interest_rate;
double compound_interest;

printf("Program to Calculate Continuous Compounded Interest\n");

printf("Enter Principal Amount:");
scanf("%lf",&amount);

printf("Enter Number of Years:");
scanf("%lf",&years);

printf("Enter Interest Rate:");
scanf("%lf",&interest_rate);

compound_interest = amount * exp((interest_rate / 100) * years);
printf("Future Value after Continuous Compounded Interest = %lf\n",compound_interest);
}

/***
Sample Output:

Program to Calculate Continuous Compounded Interest
Enter Principal Amount:1000
Enter Number of Years:5
Enter Interest Rate:5
Future Value after Continuous Compounded Interest = 1284.025417

Press any key to continue . . .

***/

```
« Last Edit: December 29, 2011, 01:30:27 pm by kathir »

Disclaimer: This web site is for educational and informational purposes only. Click here to read the Disclaimer.