C Program to Calculate Simple Interest

Calculate simple Interest in C: To calculate simple interest below is the Formula.

Formula: 

SI = P * T * R / 100

Where SI = Simple Interest.
P = Principe amount.
T = time.
R = Rate of interest.

Calculate Simple Interest Program in C
#include<stdio.h>
int main()
{
 float p;
 float interest, time;
 float in;
  printf("Type your principle amount = ");
  scanf("%f",&p);
  printf("\n Type your rate of interest = ");
  scanf("%f",&interest);
  printf("\n Type time in year = ");
  scanf("%f",&time);
  in=p*interest*time/100;
  printf("\n You will get interest = %.2f",in);
 return 0;
}
Output:
Type your principle amount =  100000
Type your rate of interest = 10
Type time in year = 10
You will get interest = 100000.00
Explanation:
  • First Four data types are declared p, interest, time, in of type Float.
  • The values of p, interest, time is taken from the keyword.
  • The result of (p*interest*time)/(100) stored in the value of in.

See also:
Share:

Our Services

Search This Blog

  • ()
Powered by Blogger.

Alphabet Pattern (or) Character Pattern21 Program in C

Write "C"  Program to print below Alphabet Pattern21 (or) Character Pattern21: To underst...

Blog Archive