Problem Analysis:
The problem is to calculate the simple interest having the parameters principal(p),time(t), and radius(r).The output is to display the simple interest.
The formula to calculate the simple interest is:
I= p * t *r / 100
Input variables processing variables Output variables Necessary header files
p(int) I= p *t *r /100 I (float) stdio.h
t(int) conio.h
r(int)
Algorithms:
1.start
2. Input the parameters p,t and r and assign as ;
i.e int p,t;
float r;
3. Calculate the simple interest using formulas.
i.e. i= p * t *r /100
4. Print the value of I.
5.End.
Flowchart:
fig; Flowchart to print the simple interest.
Code:
Outputs;
Compiling , Debugging and Testings.
Enter p , t , r: 4000 2 5.5
simple interest: 440.000000