I am trying to write this formula in C++ syntax. Please see this mortgage calculator page where the formula resides. Thank you.
http://www.netjeff.com/MortgageCalculator/PNI.html