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.
- Write a program to calculate the simple interest.
- The values of principle, rate of interest and the number of years are input from the keyboard.
- Display the value of the calculated Simple interest on a new line.
- //C Program to calculate simple interest by given principle, rate of interest and time
. - #include<stdio.h>
- main ()
- {
- int p, n;
- float r, si;
- printf(" Enter the values of p, n, r: ");
- scanf("%d %d %f", &p, &n, &r);
- si=p*n*r/100;
- printf("%f", si);
- }