📜  C复利计画

📅  最后修改于: 2021-05-28 03:21:32             🧑  作者: Mango

复利公式:

例子:

Input : Principle (amount): 1200
        Time: 2
        Rate: 5.4
Output : Compound Interest = 1333.099243
C++
// CPP program to find compound interest for
// given values.
#include 
using namespace std;
  
int main()
{
    double principle = 10000, rate = 10.25, time = 5;
  
    /* Calculate compound interest */
    double CI = principle * (pow((1 + rate / 100), time));
  
    cout << "Compound interest is " << CI;
  
    return 0;
}
Please refer complete article on Program to find compound interest for more details!Want to learn from the best curated videos and practice problems, check out the C Foundation Course for Basic to Advanced C.