C Program to Calculate Simple Interest

C Program To Calculate Simple Interest



 

/*******************************************************************

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 n,p,r,SI;

printf("Please enter principle amount\n");

scanf("%f",&p);

printf("Please enter interest rate\n");

scanf("%f",&r);

printf("Please enter no. of. years you want loan\n");

scanf("%f",&n);

SI=n*p*r/100;

printf("Simple interest on principle amount is:\t%f\n",SI);

printf("End of program");

}

Please enter principle amount

10000

Please enter interest rate

10

Please enter no. of. years you want loan

3

Simple interest on principle amount is: 3000.000000

End of program


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

0 टिप्पण्या