Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can you help a C# newbie?
Message
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01190811
Message ID:
01190820
Views:
18
Nevermind! I've just found it.


>Hi all, this is my first posting in the .NET section. I'm trying to learn C# by my self and have already a few books but nothing beats a good teacher.
>
>I have the following formula in VFP working but it's been difficult for me to make it work in C#.
>
>
>     nCuota=ROUND(nCapital *  ( nRate / (1 - (1 + nRate) ** -nPeriodos)),2)
>
>
>This's the C# code I have
>
>
> double  mRate, mPeriodos, mCapital, mInteres,mCuota;
>
>            mRate = Convert.ToDouble(nudAPR.Value);
>            mPeriodos = Convert.ToDouble(nudPeriodos.Value);
>            mCapital = Convert.ToDouble(txtCapital.Text);
>
>            // Tasa Interes Mensual
>            mInteres=((mCapital*((mRate*0.01d)/360d))*30d);
>
>            mCuota = mCapital * (mRate / Math.Pow((1 - (1 + mRate)) ,-mPeriodos));
>            txtMensual.Text =  Convert.ToString(mCuota);
>
>
>But the final values of mCuota are wrong, can anybody please tell me where is the problem. This is just an exercise I wanted to do.
>
>TIA,
>Enmanuel
I'm a mixture of Albert Einstein and Arnold Schwarzenegger. The only trouble is that I got Einstein's body and Schwarzenegger's brain
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform