C Programming Ex1
C Programming Ex1
AIM
To write C program to calculate simple interest and compound interest.
ALGORITHM
Start
Read Principal Amount(p), No. of years(n) and Rate of Interest(r)
Calculate Simple Interest using formula SI=(p*n*r)/100;
Calculate Compound Interest using formula
ci = p * (pow(1 + r / 100, n) - 1);
#include <stdio.h>
#include <math.h>
#include <conio.h>
void main()
{
float p, t, r, si, ci;
clrscr();
getch();
}
Result:
Thus, the C program to calculate simple interest and compound interest was
executed successfully.