이 자습서에서는 복리를 찾는 프로그램에 대해 설명합니다.
복리 이자는 원금에 현재 이자를 더한 다음 갱신된 금액에 대한 이자를 계산한 이자를 말합니다.
예
#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