Category : C Source Code
Archive   : PCC-FNCT.ZIP
Filename : REGDEPOS.C

 
Output of file : REGDEPOS.C contained in archive : PCC-FNCT.ZIP
/* Copyright (c) 1985 Martin Nohr and Tom Serface
* All Rights Reserved
*
* Revision Date Description
* -------- --------- --------------------------------------------
*
* regdeposit - Returns Regular Deposit needed to Reach a Future Sum
* This calculates the deposit amount required to reach
* a desired future value given the future value, nominal interest
* rate, number of deposits per year, and the total number of
* deposits that will be made (assumes 1 deposit per period)
* Call as: regdeposit(f,i,n,y);
* Where:
* f = future value desired
* i = annual interest rate
* n = number of deposits per year
* y = number of total deposits
*
* double regdeposit();
* double f,i;
* int n,y;
*/

double
regdeposit(f,i,n,y) /* Regular Deposit Needed to Reach a Future Value */
double f,i;
int n,y;
/* f = future value desired
i = annual interest rate
n = number of deposits per year
y = total number of deposits
*/
{
return(round(f*((i/n)/(pow(1+(i/n),(double)y)-1)),2));
}


  3 Responses to “Category : C Source Code
Archive   : PCC-FNCT.ZIP
Filename : REGDEPOS.C

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. 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/