C Program Calculation of Simple Interest

How to write a C Program Calculation of Simple Interest in C Programming Language ?


Solution:
This Program calculates the value of Simple Interest. The Values of Principle, Rate of Interest and the number of years is input through the keyboard.

  1. Write a program to calculate the simple interest.
  2. The values of principle, rate of interest and the number of years are input from the keyboard.
  3. Display the value of the calculated Simple interest on a new line.
  1. //C Program to calculate simple interest by given principle, rate of interest and time.
  2. #include<stdio.h>
  3. main ()
  4.  
  5. {
  6. int p, n;
  7. float r, si;
  8. printf(" Enter the values of p, n, r: ");
  9.  
  10. scanf("%d %d %f", &p, &n, &r);
  11.  
  12. si=p*n*r/100;
  13.  
  14. printf("%f", si);
  15. }


Learn More :