Write a program to get input from user and calculate EMI as per formula:
E=PR(1+R)n / ((1+R)n -1)
Where,
E=EMI, P=Principal amount, R=Rate of interest, n=tenure of loan in months. (pls ans as soon as possible)
Answers
Answered by
3
Explanation:
EMI Calculator program in C
#include <math.h>
#include <stdio.h>
// Function to calculate EMI
float emi_calculator(float p, float r, float t)
{
float emi;
r = r / (12 * 100); // one month interest
t = t * 12; // one month period
emi = (p * r * pow(1 + r, t)) / (pow(1 + r, t) - 1);
return (emi);
}
// Driver Program
int main()
{
float principal, rate, time, emi;
principal = 10000;
rate = 10;
time = 2;
emi = emi_calculator(principal, rate, time);
printf("\nMonthly EMI is= %f\n", emi);
return 0;
}Output:
Monthly EMI is= 461.449677
Similar questions
Computer Science,
3 months ago
Physics,
3 months ago
Hindi,
3 months ago
Physics,
7 months ago
English,
11 months ago
Social Sciences,
11 months ago