Skip to content

Program to Find Simple Interest in C

Formula:

Simple Interest = (Amount × Period × Rate) / 100

#include <stdio.h>

int main()
{
float amount, period, rate, simpleInterest;

printf(“Enter the amount: “);
scanf(“%f”, &amount);

printf(“Enter the period in years: “);
scanf(“%f”, &period);

printf(“Enter the rate of interest: “);
scanf(“%f”, &rate);

simpleInterest = (amount * period * rate) / 100;

printf(“Simple Interest = %.2f”, simpleInterest);

return 0;

}

Explanation

  • amount stores the principal amount.
  • period stores the time in years.
  • rate stores the rate of interest.
  • The formula (amount * period * rate) / 100 calculates the simple interest.
  • %.2f displays the result up to 2 decimal places.