C Programming
We will be discussing about the program to find Simple interest and Compounding interest. To write the program fist we should understand what is simple and compound interest?
What is simple interest?
Simple interest is the amount which we get, when we initially invest some money to some period of time and a small percent of initial money is add to the initial invested money.
Given by the formula SI=(p*r*t)/100
where, p is principle i.e initial amount
r is rate i.e some percent on initial amount
t is time i.e particular period
What is compound interest?
Compound interest is not only paid on the initial money but accumulated interest in the previews period on initial amount.
Given by the formula: CI =p*(1+r/100)^t
where, p is principle i.e initial amount
r is rate i.e some percent on initial amount
t is time i.e particular period
C program to find simple interest and compound interest.
Explanation:
- Header file stdio.h - standard input and output to get input and show output, conio.h - console input and output, math.h- to do mathematical operation inprogram .
- void main - function returning value will be null.
- float - declare the type of variable.
- clrscr - clear the screen.
- printf - used to print in output screen.
- scanf - used to accept input, and read.
- getch - used to hold the screen until the user gives any type of input.
- pow()- i use power function here, to make it simple.
OUTPUT:
The above program helps use to calculate simple interest and compound interest in simple and fast. We used basic C function to find them.
Recommended..
In following days we will discuss more programs in detail. If you like to learn more just follow me regularly. If you have any question to ask mention below in comment.Thank you......


Comments
Post a Comment