Finding Compound Interest In Programming
In this blog, you will learn how to find the compound interest.
Introduction
- In this blog, I am going to explain how to find the compound interest in C programming.
Software Requirements
Programming
- #include < stdio.h >
- #include < math.h > int main()
- {
- float amount, rate, time, CI;
- printf("Enter principle (amount): ");
- scanf("%f", & amount);
- printf("Enter time: ");
- scanf("%f", & time);
- printf("Enter rate: ");
- scanf("%f", & rate);
- CI = amount * (pow((1 + rate / 100), time) - 1);
- printf("Compound Interest = %f", CI);
- return 0;
- }
Explanation
- In the programming, given above, the compound interest can be calculated by a simple formula and it can be in a simple manner.
Output
Conclusion
- Thus, the program can be executed and printed successfully.