C Program to Calculate Simple Interest

Below C program allows the user to enter the “principal amount”, “rate of interest”, and the “number of years”. We will calculate simple interest by using entered values with the help of above mentioned simple interest formula.

#include<stdio.h>
int main()
{
float principalAmt, rateOfInterest, Time_Period, simpleInterest,monthlyEmi;
printf(“Please enter the Principal Amount : = “);
scanf(“%f”, &principalAmt);
printf(“Please Enter Rate Of Interest : = “);
scanf(“%f”, &rateOfInterest);
printf(“Please Enter the Time Period in Years : = “);
scanf(“%f”, &Time_Period);
simpleInterest = (principalAmt * rateOfInterest * Time_Period) / 100;
printf(“Simple Interest for Principal Amount %.2f is = %.2f\n”, principalAmt, simpleInterest);
monthlyEmi = (principalAmt+simpleInterest)/(Time_Period*12);
printf(“Monthly EMI for using simple interest is = %.2f\n”,monthlyEmi);
return 0;
}

Output:

Please enter the Principal Amount: = 730000
Please Enter Rate Of Interest : = 8.85
Please Enter the Time Period in Years: = 5
Simple Interest for Principal Amount 730000.00 is = 323025.00
Monthly EMI for using simple interest is = 17550.42

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *