CProgram

Program to find Simple Interest and Compound Interest

C Program to find Simple Interest and Compound Interest.

/*Program to find Simple Interest and Compound Interest
SI = (p * r * t) / 100
CI = p * pow((1 + r/100), t) – p*/
#include <stdio.h>
#include <math.h>
main()
{
float p, r, t, si, ci;
printf(“\nEnter priciple, rate and time: “);
scanf(“%f %f %f”, &p, &r, &t);
si = (p * r * t) / 100;
ci = p * pow((1 + r/100), t) – p;
printf(“\n\nSimple Interest: %.2f”, si);
printf(“\n\nCompound Interest: %.2f”, ci);
getch();
}

What's your reaction?

Excited
0
Happy
0
In Love
0
Not Sure
0
Silly
0

You may also like

Leave a reply

Your email address will not be published. Required fields are marked *

More in:C