find error in this program
// 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;
}
Answers
Answered by
3
Answer:
// 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;
}
Explanation:
No error in this coding
Answered by
0
Answer:
hope this helps you...
Attachments:
Similar questions
Computer Science,
5 months ago
Math,
5 months ago
Geography,
5 months ago
Math,
10 months ago
Computer Science,
10 months ago
Biology,
1 year ago
Biology,
1 year ago