Calculate Simple Interest – C Program
Write a c program of calculate simple interest of given number
below is the c program for calculate simple interest of given number.
#include<stdio.h>
#include<conio.h>
void main()
{
float amt,rate,yr,ans;
printf("Enter your basic amount : \n ");
scanf("%f",&amt);
printf("Enter your interest rate : \n");
scanf("%f",&rate);
printf("Enter number of year for calculate interest: \n");
scanf("%f",&yr);
ans=amt*rate*yr/100;
printf("The total interest is : %.2f",ans);
}
The C Program output is :
Enter your basic amount :
50000
Enter your interest rate :
5
Enter number of year for calculate interest:
2
The total interest is : 5000