C program to calculate Simple Interest

 C program to calculate Simple Interest 




values are assigned in program with assignment operator


/*******************************************************************
C program to calculate Simple Interest.
SI- Simple Interest
n- period or time
r - rate of Interest
p - principle amount
SI=n*p*r/100
*****************************************************************/
#include<stdio.h>
void main()
{
float p=1000;
float r=10;
float n=3;
float SI;

SI=p*r*n/100;
printf("Simple interest on principle amount is:\t%f\n",SI);
printf("After three years customer has to pay total amount\t%f\n",SI+p);
printf("End of program");
}

Simple interest on principle amount is: 300.000000

After three years customer has to pay total amount 1300.000000

End of program

टिप्पणी पोस्ट करा

0 टिप्पण्या