Monday, January 3, 2011

Program to calculate simple interest.

/*
Name: Program to find out Simple interest
Author: Parveen Malik
Date: 03/01/11 18:45
*/

#include<stdio.h>
#include<conio.h>


void main()
{
float rate,time,prin; // declaring rate, time and principle
float si; // simple interest

printf("Enter the value of\n\nPrinciple : "); // taking user
scanf("%f",&prin); //principle
printf("Rate : ");
scanf("%f",&rate);
printf("Time : ");
scanf("%f",&time);


si=prin*rate*time/100; //formula of finding simple interest
printf("\nSimple Interest : %.2f",si); // printing simple interest to the console

getch();
}




[caption id="attachment_55" align="aligncenter" width="800" caption="OUTPUT:"]program to find out simple interest[/caption]



0 comments:

Post a Comment