Statement of 'C' program: Enter the Principal Amount, Rate of interest and Time and Calculate the Simple Interest.
#include<stdio.h>
#include<conio.h>
void main()
{
float P ,R ,SI ; // P stands for Principal Amount
// R stands for Rate of Interest
// SI stands for Simple Interest
clrscr();
// SI stands for Simple Interest
clrscr();
printf("Enter the value of P,R,T"); // printf() and scanf() are used to print and read data
scanf("%f/n%f/n%d/n" , &P ,&R ,&T);
SI=(P*R*T)/100.0 ; // Formula of Simple Interest
printf("P=%f/n" , P);
printf("R=%f/n" , R);
printf("T=%d/n" , T);
printf("SIMPLE INTEREST=%f/n" , SI);
}
Output:
Enter the value of P,R,T
3000.00
5
3
P= 3000.00
R=5
T=3
SIMPLE INTEREST=450.00000
0 Response to "C Program: Enter the Investment,Rate and Time and Compute the Simple Interest"
Post a Comment