// Program for calculating the simple interest //
#include<stdio.h>
#include<conio.h>
void main()
{
float p,r,t,si;
printf("Enter the principal amount\n");
scanf("%f", &p);
printf("Enter the rate of interest\n");
scanf("%f", &r);
printf("Enter the time period\n");
scanf("%f", &t);
si=(p*r*t)/100;
printf("Simple Interest is:- %f", si);
getch();
}
{
float p,r,t,si;
printf("Enter the principal amount\n");
scanf("%f", &p);
printf("Enter the rate of interest\n");
scanf("%f", &r);
printf("Enter the time period\n");
scanf("%f", &t);
si=(p*r*t)/100;
printf("Simple Interest is:- %f", si);
getch();
}


Comments
Post a Comment