#include <iostream>
#include <cmath>
using std::cout;
int main()
{
float loan_amount = 100000, interest_per_month = 10.5, years = 6;
interest_per_month = interest_per_month / (12 * 100);
int total_months = years * 12;
float emi = (loan_amount * interest_per_month *
pow(1 + interest_per_month, total_months)) /
(pow(1 + interest_per_month, total_months) - 1);
cout << "Monthly EMI = " << emi << "\n";
return 0;
}
/*
run:
Monthly EMI = 1877.9
*/