
- C++ Basics
- C++ Home
- C++ Overview
- C++ Environment Setup
- C++ Basic Syntax
- C++ Comments
- C++ Data Types
- C++ Variable Types
- C++ Variable Scope
- C++ Constants/Literals
- C++ Modifier Types
- C++ Storage Classes
- C++ Operators
- C++ Loop Types
- C++ Decision Making
- C++ Functions
- C++ Numbers
- C++ Arrays
- C++ Strings
- C++ Pointers
- C++ References
- C++ Date & Time
- C++ Basic Input/Output
- C++ Data Structures
- C++ Object Oriented
- C++ Classes & Objects
- C++ Inheritance
- C++ Overloading
- C++ Polymorphism
- C++ Abstraction
- C++ Encapsulation
- C++ Interfaces
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
- Related Articles
- C++ Program to Calculate simple interest and compound interest
- C Program for compound interest?
- C Program for the compound interest?
- Java Program to calculate Simple Interest and Compound Interest
- Swift Program to Calculate simple interest and compound interest
- Kotlin Program to calculate Simple Interest and Compound Interest
- Haskell Program to Calculate simple interest and compound interest
- Java Program to calculate Compound Interest
- Swift Program to Calculate Compound Interest
- Kotlin Program to Calculate Compound Interest
- C++ program to find the rate percentage from compound interest of consecutive years
- Python Program for compound interest
- Java Program to Calculate the Compound Interest
- Compare simple interest and compound interest.
- Calculate compound interest in JavaScript

Advertisements