Click here to Skip to main content
15,888,579 members
Home / Discussions / C#
   

C#

 
GeneralRe: control of child form when using showDialog() Pin
randor7-Nov-15 11:46
randor7-Nov-15 11:46 
GeneralRe: control of child form when using showDialog() Pin
randor7-Nov-15 11:49
randor7-Nov-15 11:49 
AnswerRe: control of child form when using showDialog() Pin
Richard Andrew x647-Nov-15 11:55
professionalRichard Andrew x647-Nov-15 11:55 
AnswerRe: control of child form when using showDialog() Pin
BillWoodruff6-Nov-15 14:43
professionalBillWoodruff6-Nov-15 14:43 
GeneralRe: control of child form when using showDialog() Pin
John Torjo7-Nov-15 3:32
professionalJohn Torjo7-Nov-15 3:32 
QuestionEmbedding custom font to PDF using iTextsharp Pin
GauravDutta5-Nov-15 22:08
GauravDutta5-Nov-15 22:08 
AnswerRe: Embedding custom font to PDF using iTextsharp Pin
Pete O'Hanlon5-Nov-15 22:39
mvePete O'Hanlon5-Nov-15 22:39 
QuestionHow to calculate Interest Rate of Loan having quarterly payment frequency and monthly compounding using c#. Pin
Member 104985445-Nov-15 19:00
Member 104985445-Nov-15 19:00 
Known Variables:

1 Loan Amount : 100000
2 Period : 36 months
3 Installment : per Quarter 10500

We have to find Interest Rate for quarterly payment frequency having monthly compounding?
Answer of this is = 17.7802951925.

Standard Emi Formula


EMI = P*r*((1+r)^n)/((1+r)^n-1)
I have calculated Monthly installment with help of following code


m_Principle = p;
m_MonthalyPayments = m;
m_NoOfMonths = n;
double temp = (m_MonthalyPayments / m_Principle);
double answer = temp;
double diff = 100;
double numerator = 0;
double denomenator = 0;
double accuracy = .00001;
int maxIteration = 1000;
int index = 0;
try
{
for (index = 0; ((diff > accuracy) && (index < maxIteration)); index++)
{
temp = answer;
numerator = (m_Principle * (temp / m_MonthalyPayments)) + Math.Pow((1 + temp), -m_NoOfMonths) - 1;

denomenator = (m_Principle / m_MonthalyPayments) - (m_NoOfMonths * Math.Pow((1 + temp), (-m_NoOfMonths - 1)));

answer = temp - (numerator / denomenator);
diff = answer - temp;

if (diff < 0)
{

diff = -diff;

}
}

answer *= 1200;
if ((answer < 0) || Double.IsNaN(answer) || (index == maxIteration))
{
throw new ArithmeticException();
}

}
catch (Exception ex)
{
throw new Exception(ex.Message, ex);
}

return answer;



With this Result for monthly calculation are matching correctly. For Quarterly installments i have changed only 12000 to 400 to multiply answer in code.
AnswerRe: How to calculate Interest Rate of Loan having quarterly payment frequency and monthly compounding using c#. Pin
John Torjo5-Nov-15 20:08
professionalJohn Torjo5-Nov-15 20:08 
GeneralRe: How to calculate Interest Rate of Loan having quarterly payment frequency and monthly compounding using c#. Pin
Member 104985445-Nov-15 20:48
Member 104985445-Nov-15 20:48 
GeneralRe: How to calculate Interest Rate of Loan having quarterly payment frequency and monthly compounding using c#. Pin
John Torjo10-Nov-15 4:46
professionalJohn Torjo10-Nov-15 4:46 
QuestionI need help improving my code Pin
Gilbert Consellado5-Nov-15 16:38
professionalGilbert Consellado5-Nov-15 16:38 
AnswerRe: I need help improving my code Pin
John Torjo5-Nov-15 17:34
professionalJohn Torjo5-Nov-15 17:34 
GeneralRe: I need help improving my code Pin
Gilbert Consellado5-Nov-15 17:38
professionalGilbert Consellado5-Nov-15 17:38 
GeneralRe: I need help improving my code Pin
V.5-Nov-15 19:36
professionalV.5-Nov-15 19:36 
GeneralRe: I need help improving my code Pin
John Torjo5-Nov-15 19:45
professionalJohn Torjo5-Nov-15 19:45 
GeneralRe: I need help improving my code Pin
V.5-Nov-15 19:58
professionalV.5-Nov-15 19:58 
GeneralRe: I need help improving my code Pin
John Torjo5-Nov-15 20:04
professionalJohn Torjo5-Nov-15 20:04 
AnswerRe: I need help improving my code Pin
BillWoodruff5-Nov-15 19:25
professionalBillWoodruff5-Nov-15 19:25 
GeneralRe: I need help improving my code Pin
Gilbert Consellado5-Nov-15 23:42
professionalGilbert Consellado5-Nov-15 23:42 
GeneralRe: I need help improving my code Pin
BillWoodruff6-Nov-15 0:42
professionalBillWoodruff6-Nov-15 0:42 
GeneralRe: I need help improving my code Pin
Gilbert Consellado6-Nov-15 2:17
professionalGilbert Consellado6-Nov-15 2:17 
GeneralRe: I need help improving my code Pin
BillWoodruff6-Nov-15 2:40
professionalBillWoodruff6-Nov-15 2:40 
GeneralRe: I need help improving my code Pin
Gilbert Consellado6-Nov-15 3:00
professionalGilbert Consellado6-Nov-15 3:00 
GeneralRe: I need help improving my code Pin
BillWoodruff6-Nov-15 4:14
professionalBillWoodruff6-Nov-15 4:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.