- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Program to find compound interest in C++
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.
Example
#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; }
Output
Compound interest is 16288.9
Advertisements