Program 04, C
Program 04, C
ROLL NO.1324595
PROGRAM -04
[4] Write a program to calculate simple interest and compound interest considering appropriate
variables.
1] ALGORITM-
Step 1) Start
S.I.=(P*r*t)/100 , C.I.=P*((1+r/100)^t-1)
Step5) End
2]FLOWCHART-
START
S.I.=(P*r*t)/100 ,
C.I.=P*((1+r/100)^t -1)
Stop
3] SOURCE CODE-
#include<stdio.h>
#include<conio.h>
#include<math.h>
int main()
clrscr();
&p);
scanf("%f", &t);
scanf("%f", &r);
si = (p * t * r)/100.0;
ci = p * (pow(1+r/100, t) - 1);
getch();
return(0);
4] OUTPUT-