#include
#include
The main ()
{
Double rate, capital, deposit;
int n;
Printf (" do enter rate, year, capital: \ n ");
The scanf (" % lf, % d, % lf ", & amp; Rate, & amp; N, & amp; Capital);
Deposit=capital * pow (1 + rate, n);
Printf (" deposit=% 3 f \ n ", deposit).
return 0;
}
CodePudding user response:
The scanf (" % lf, % d, % lf ", & amp; Rate, & amp; N, & amp; Capital);You are required to enter 0.00225, 10100 0
When the input in the middle of the comma cannot be omitted
CodePudding user response:
Either enter 0.00225, 10100 0Either change the scanf (" % lf, % d, % lf ", & amp; Rate, & amp; N, & amp; Capital); Lf the scanf (" % % d % lf ", & amp; Rate, & amp; N, & amp; Capital);
CodePudding user response:
Fun