0% found this document useful (0 votes)
87 views

To Write A C Program For Calculating Simple Interest

This document outlines a C program to calculate simple interest. It lists the aim as writing a program to calculate simple interest. The algorithm has 5 steps: 1) read inputs for principal, years, and interest rate, 2) calculate simple interest as principal times years times rate divided by 100, 3) display the simple interest, 4) end the program. The program code implements this algorithm by prompting the user to input the values, performing the calculation, and printing the result.
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)
87 views

To Write A C Program For Calculating Simple Interest

This document outlines a C program to calculate simple interest. It lists the aim as writing a program to calculate simple interest. The algorithm has 5 steps: 1) read inputs for principal, years, and interest rate, 2) calculate simple interest as principal times years times rate divided by 100, 3) display the simple interest, 4) end the program. The program code implements this algorithm by prompting the user to input the values, performing the calculation, and printing the result.
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

EX.

NO: 2a PROGRAM TO PRINT SIMPLE INTEREST


DATE: 3/8/2016

AIM
To write a C program for calculating Simple Interest.

ALGORITHM
1. Start
2. Read two input for principle(p), Number of years(n) and Rate of Interest(r )
3. Calculate Simple Interest si=(p*n*r/100)

4. Display Simple Interest(si)


5. Stop
PROGRAM:

#include<stdio.h>
int main( )
{
float p,n,r,si;
clrscr();
printf(Enter principle, Number of years and Rate of Interest :\n);
scanf(%f%f%f,&p,&n,&r);
si=(p*n*r/100);
printf(The Simple Interest is : %2.2f: ,si);
return 0;
}

OUTPUT:-

RESULT:
Thus the C program for calculating Simple Interest has been executed successfully.

You might also like