Program to find simple interest

Program to find simple interest

Hello friends today we are going to learn program which will come to a simple interest of the given input today see for fun brings you for simple program to find a simple interest of the input given by the user.
Different coding programs are available but you need to make some base then how to do that
Here we are now present with the simple coding of the program source code has been uploaded on the blog you may go through the program to find the simple interest and can check the source code to make a program step by step guide is available, to help you out enjoy coding and making different programs.


Now question how to make this program what is the logic behind the simple interest in maths we have learn how to calculate the simple interest same concept is applied in the C language.
The terms needed are rate time and the principal amount of money you have taken which are all multiplied together to get the desired result.

C program to find the simple interest which is given by

Principle(amount), the rate at which you are given and the time you required for that.
from this, a formula can be generated as 
simple interest=(p*r*t)/100

where symbols have their usuall meaning.


here is the source code provide by c4fun for the program to calculate simple interest.
the program is checked and has beed compiled !!
#include<stdio.h>
#include<conio.h>
void main()
{
Int p,r,t;
float si;
clrscr();
printf(“enter  value of principle rate and time\n”);
scanf(“%d%d%d”,&p,&r,&t);
si=(p*r*t)/100;
printf(“simple interest=%f”,si);
getch();
 }


the output generated is:
Output
Enter value of principle rate and time
1000       5              1

Simple interest=500.0000

Now when you have the program with you make some changes in your program as an Input and try to modify your program according to your need 2 comment the result obtained when you have made changes in your program.
Comment the result you have obtained when you have perform different operations and entered different values in your code.




Share among your friends and help them to find the output and the source code how to make the program with the simple logic C for fun is based on the sharing is caring so your friends and help them to get the logic with a simple program.

If you have any doubt question or query you make post in comment section.

No comments

thanks for reading and sharing.I hope it would help you!!!!

Powered by Blogger.