The best deposit scheme and instance deposit scheme for C language code instances
Assume that the monthly interest rate the bank receives for one year is 0.63%. Now someone has a money in his hand. He plans to get 1000 yuan at the end of each year in the next five years. It will just be finished in 5th years. How much should he save?
Analysis:
Deposits at the beginning of 5th: 1000 RMB/(1 + 12*0.0063 RMB );
Deposits at the beginning of 4th: (1000 + 5th deposits at the beginning of 0.0063)/(1 + 12 );
Deposits at the beginning of 3rd: (1000 + 4th deposits at the beginning of 0.0063)/(1 + 12 );
Deposits at the beginning of 2nd: (1000 + 3rd deposits at the beginning of 0.0063)/(1 + 12 );
Deposits at the beginning of 1st: (1000 + 2nd deposits at the beginning of 0.0063)/(1 + 12 ).
# Include
Void main () {int I; float money = 0.0; for (I = 5; I> 0; I --) {money = (1000.0 + money) /(1 + 12*0.0063);} printf ("saved % 0.2f RMB \ n", money );}