0% found this document useful (0 votes)
8 views2 pages

Program No 4

The document presents a C program that calculates simple and compound interest based on given principal, rate, and time. It includes the source code, an algorithm outlining the steps to perform the calculations, and a flowchart representing the process. The program outputs the calculated simple and compound interest values for a principal of 5000, rate of 18%, and time of 2 years.

Uploaded by

Devanshu Jaat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views2 pages

Program No 4

The document presents a C program that calculates simple and compound interest based on given principal, rate, and time. It includes the source code, an algorithm outlining the steps to perform the calculations, and a flowchart representing the process. The program outputs the calculated simple and compound interest values for a principal of 5000, rate of 18%, and time of 2 years.

Uploaded by

Devanshu Jaat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

DEVANSHU 1324035

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

Input principle, rate, time

Compute the Simple Interest and Compund


Interest

Display the Output

Stop

You might also like