1. Assuming that the bank has saved 0 monthly for a year 8.9% (purely entertaining ha), now that you have a sum of money in your hand, you intend to take out 10000 yuan at the end of the next 100 years, and by the 10,000th year, how much do you want to deposit now?
Unlike the traditional math problem, it needs to be reversed to calculate.
Deposit at the beginning of the year (i+1) (deposit +10000 at the beginning of the year)/(1+0.089*12)
#include<stdio.h>int main(){ int i; float money=0; for(i=0;i<100;i++) money=(money+10000)/(1+0.089*12); printf("You just need to put %.2f in the Bank.\n",money);}
toput9363.30inthe Bank.
Haha, you have not heard the wrong, save less than 10,000 this year, after the year can be removed 10,000 ...
But I don't have 10,000 in my hand. So how to save money to make the biggest profit?
The monthly interest rates for the different periods of the bank's deposit and withdraw deposits are:
0.63% term = 1 years
0.66% term = 2 years
0.69% term = 3 years
0.75% term = 5 years
0.84% term = 8 years
Interest = principal * Monthly interest rate * 12 * deposit years.
The questions and answers are all from the network, because the answer is very good, so do not make any changes ...
In order to get the most interest, the money deposited in the bank should be taken out immediately upon expiry, and then immediately add the original principal and interest to the bank as the new principal, so as to keep rolling until the end of 20, because the interest rate of the deposit is different, so the interest of the different deposit methods (years) in 20 will not be the same.
Analysis test instructions, set an X-yuan deposit in 20, of which 1 years i1, 2 i2 times, 3 years i3 times, 5 years i5 times, 8 years to save i8 times, the maturity of the depositor should be the total Benli:
2000*(1+rate1)i1*(1+rate2)i2*(1+rate3)i3*(1+rate5)i5*(1+rate8)i8
Where the Raten is the interest rate for the corresponding deposit years. The following restrictions are also available according to test instructions:
0<=i8<=20<=i5<= ( --8*i8)/50<=i3<= ( --8*i8-5*i5)/30<=i2<= ( --8*i8-5*i5-3*i3)/20<=i1= --8*i8-5*i5-3*i3-2*i2
Can use the poor lifting method of all the i8, i5, i3, i2 and i1 combination, substituting for Benli formula to calculate the maximum value, is the best deposit scheme.
#include <stdio.h>#include <math.h>intMain () {printf("How many money does you have?\n"); Double money; scanf"%lf", &money);intI8,I5,I3,I2,I1,N8,N5,N3,N2,N1; Float max=0, term; for(i8=0;i8<3; i8++) for(i5=0; I5<= ( --8*i8)/5; i5++) for(i3=0; I3<= ( --8*i8-5*i5)/3; i3++) for(i2=0; I2<= ( --8*i8-5*i5-3*i3)/2; i2++) {i1= --8*i8-5*i5-3*i3-2*i2; Term=money*pow(double) (1+0.0063*12), (double) i1)*pow(double) (1+2*0.0063*12), (double) i2)*pow(double) (1+3*0.0069*12), (double) i3)*pow(double) (1+5*0.0075*12), (double) i5)*pow(double) (1+8*0.xx84*12), (double) i8);if(Term>max) {max=term;n1=i1;n2=i2;n3=i3;n5=i5;n8=i8; } }printf("for Maxinum Profit,he should," save his money in a bank:\n ");printf("made fixed deposit for 8 year: %d times\n", N8);printf("made fixed deposit for 5 year: %d times\n", N5);printf("made fixed deposit for 3 year: %d times\n", N3);printf("made fixed deposit for 2 year: %d times\n", N2);printf("made fixed deposit for 1 year: %d times\n", N1);printf("Toal: %. 2f\n ", max);}
The problem of saving money