VOOZH about

URL: https://www.geeksforgeeks.org/c/c-program-for-simple-interest/

⇱ C Program To Find Simple Interest - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

C Program To Find Simple Interest

Last Updated : 23 Jul, 2025

Write a C program to find the simple interest.

Simple Interest is the interest paid on the principal amount for which the interest earned regularly is not added to the principal amount.

Examples

Input: Principal = 1000, Rate = 5, Time = 2
Output: Simple Interest = 100

Input: Principal = 2000, Rate = 3.5, Time = 4
Output: Simple Interest = 280

How to Find Simple Interest in C?

To find the simple interest in the C programming language, we can directly implement the simple interest formula with the required values such as rate, time, and principal amount as input since there is no built-in C function to calculate it directly.

Simple Interest Formula

Simple Interest = Principal * Rate * Time​ / 100

Simple Interest Program in C


Output
Simple Interest = 0.010000

Time Complexity: O(1)
Auxiliary Space: O(1)

Simple Interest Calculator Using Function

We can also define a function name smpInt() that takes rate, time and principle as arguments at returns the simple interest. It is more convenient when we need to find the simple interest frequently.


Output
Simple Interest: 1200.00

Time Complexity: O(1)
Auxiliary Space: O(1)

Comment
Article Tags: