Category : C Source Code
Archive   : PCC-FNCT.ZIP
Filename : FV.C
* All Rights Reserved
*
* Revision Date Description
* -------- --------- --------------------------------------------
*
* fv - Returns Future Value of a Present Sum
* This calculates the future value that can be expected
* from an investment given the initial value, annual interest,
* number of compounding periods (e.g., months per year, and the total
* number of periods the investment will exist.
*
* Call as fv(p,i,n,y);
* Where:
* p = present value
* i = annual interest rate
* n = number of periods per year
* y = number of total periods
*
* double fv();
* double p,i;
* int n,y;
*
*/
double
fv(p,i,n,y) /* Future Value */
double p,i;
int n,y;
{
return(round(p*pow(1+(i/n),(double)y),2));
}
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/