C Program to Calculate Simple Interest

Calculate simple Interest in C: To calculate simple interest below is the 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
int main()
 float p;
 float interest, time;
 float in;
  printf("Type your principle amount = ");
  printf("\n Type your rate of interest = ");
  printf("\n Type time in year = ");
  printf("\n You will get interest = %.2f",in);
 return 0;
Type your principle amount =  100000
Type your rate of interest = 10
Type time in year = 10
You will get interest = 100000.00
  • 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:

Our Services

Search This Blog

  • ()
Powered by Blogger.

C Variables and Types of Variables in C

C variable is a data name that may be used to store a data value. The value of the C variable may get change in the program and it can be r...

Blog Archive