C Program to Calculate Simple Interest

Simple interest is a fundamental financial concept that calculates the additional amount earned or paid on a principal sum over a period. This article discusses the calculation of simple interest in C programming and provides a clear guide to implementing its formula effectively.
Simple Interest Formula
Let's understand the formula to calculate the simple interest in the C language.
Mathematically
Where P is the principal amount, R is the rate of the interest, and the T is the total time of interest on the amount The units of rate are decimal or percentage The unit of t is years.
Transform Your Career
Choose from our industry-leading programs designed for career success
Modern Software and AI Engineering Program
Master full-stack development with AI integration
+1000 moreModern Data Science and ML with specialisation in AI
Advanced data science techniques with AI specialization
+1000 moreAdvanced AIML with Specialisation in Agentic AI
Deep dive into AIML with focus on Agentic systems
+1000 moreDevOps, Cloud & AI Platform Engineering
Build and manage AI-powered cloud infrastructure
+1000 moreAI Engineering Advanced Certification by IIT-Roorkee
Premier AI engineering certification from IIT-Roorkee
Logic to Calculate Simple Interest
Let's understand the logic of writing the simple interest program in C. To calculate simple interest, we must have the values of principal, rate, and total time of interest.
To calculate simple interest, we multiply all the given values and divide the result by 100. To get accurate, simple interest, we can store the result in the double data type because the double data type can efficiently store fractional and whole values.
Algorithm
Let's understand the algorithm to write the simple interest program in C.
- Store the values of the Principal, Time, and the Rate in the particular data types.
- Now, use this formula (P* R* T)/100 to calculate simple interest. The P is the principal, R is the rate of interest, and T is the total period of time.
- The calculated value from the above expression is the Simple interest.
Turn Learning into Career Growth
C Program to Calculate Simple Interest
Let's understand how to calculate the simple interest program in C.
Output:
Scaler Placement Report and Statistics
Scaler learners achieved 2.5x salary growth with average post-Scaler CTC reaching ₹23L.
Time Complexity
The Time Complexity of the simple interest program in C is O(1) because all the operations for calculating the simple interest are constant.
Conclusion
- The formula to find the simple interest in C language is (P*R*T)/100. The P is the Principal, R is the rate, and the T is the total interval time.
- The Decimal representation of the simple interest is the most accurate.
- The time complexity of finding the simple interest in the C language is O(1).