- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

In this article, we will learn about the solution and approach to solve the given problem statement.

**Problem statement** −We are given with three input values i.e principle, rate & time and we need to compute compound interest.

The code given below shows the process of computation of compound interest.

The formula used here is

Compound Interest = P(1 + R/100)r

Where,

P is the principal amount

R is the rate and

T is the time span

The implementation is given below

def compound_interest(principle, rate, time): CI = principle * (pow((1 + rate / 100), time)) print("Compound interest : ", CI) # main compound_interest(10000, 7.78, 2)

Compound interest : 11616.528400000001

All variables and functions are declared in global scope as shown in the figure below.

In this article, we learned about the approach to compute compound interest.

- Related Questions & Answers
- C Program for compound interest?
- C Program for the compound interest?
- Java Program to calculate Compound Interest
- Compare simple interest and compound interest.
- Program to find compound interest in C++
- Calculate compound interest in JavaScript
- Python Program for simple interest
- C Program for simple interest?
- C++ program to find the rate percentage from compound interest of consecutive years
- Simple interest in Python Program
- Python Program to Compute Simple Interest Given all the Required Values
- Compare fixed interest rate and floating interest rate
- Differentiate between fixed interest rates and floating interest rates.
- Compound Literals in C
- Compound operators in Arduino

Advertisements