🚀Beginner

Find Simple Interest

Calculate simple interest

Simple Interest (SI) is a quick method to calculate the interest charged on a loan. It is calculated on the original principal only, not on accumulated interest.

📐 Formula

SI = (P × R × T) / 100

P

Principal Amount

R

Rate of Interest (%)

T

Time (in years)

📝 Example Calculation

P = ₹10,000, R = 5%, T = 2 years

SI = (10000 × 5 × 2) / 100 = ₹1,000

C Program to Calculate Simple Interest

simple_interest.c
C
1#include <stdio.h>
2
3int main() {
4 float principal, rate, time, interest;
5
6 // Input values
7 printf("Enter Principal amount: ");
8 scanf("%f", &principal);
9
10 printf("Enter Rate of interest (%%): ");
11 scanf("%f", &rate);
12
13 printf("Enter Time (years): ");
14 scanf("%f", &time);
15
16 // Calculate Simple Interest
17 interest = (principal * rate * time) / 100;
18
19 // Display results
20 printf("\nSimple Interest = %.2f\n", interest);
21 printf("Total Amount = %.2f\n", principal + interest);
22
23 return 0;
24}
Output

Enter Principal amount: 10000

Enter Rate of interest (%): 5

Enter Time (years): 2

 

Simple Interest = 1000.00

Total Amount = 11000.00

📖 Code Explanation

CodeExplanation
float principal...Declare float variables for decimal precision
%%Prints a literal % symbol in printf
(P * R * T) / 100Apply the simple interest formula
%.2fDisplay float with 2 decimal places

🎯 Key Takeaways

SI = (P × R × T) / 100
Total Amount = P + SI
Use float for monetary values
Use %% to print % symbol

Want to Learn More?

Explore our comprehensive tutorials for in-depth explanations of C programming concepts.

Browse Tutorials
Back to All Examples