Program No 4
Program No 4
4. SOURCE CODE:
#include<stdio.h>
#include<conio.h>
void main()
{
float p,t,r,si,ci;
p=5000;
t=2;
r=18;
{
si=(p*r*t)/100;
printf(“Simple Interest:%f”,si);
ci=p*(pow(1+r/100,t)-1);
printf(“\nCompound Interest:%f”,ci);
}
getch();
}
5. OUTPUT:
DEVANSHU 1324035
PROGRAM NO.4
1. STATEMENT:
Write a program to calculate simple and compound interest
considering appropriate variables.
2. ALGORITHM:
Step1: Start
Step2 Input the variable principle, rate, time
Step3: Compute the Simple Interest and Compound Interest
Step4: Print the output
Step5: Stop
3. FLOW CHART:
START
Stop