In this tutorial, we will be discussing a program to find compound interest.
Compound interest is the interest by adding the current interest to the principal sum and then calculating the interest on the updated amount.
#include <bits/stdc++.h> using namespace std; int main(){ double principle = 10000, rate = 10.25, time = 5; //calculating compound interest double CI = principle * (pow((1 + rate / 100), time)); cout << "Compound interest is " << CI; return 0; }
Compound interest is 16288.9