Home > Back-end >  The problem is how to write the code, please answer (c).
The problem is how to write the code, please answer (c).

Time:06-08

Interest calculation, there are 1000 yuan, want to save five years, checking account current interest once every quarter and settlement, the current deposit interest rate of 0.35% (current deposit once every quarter settlement interest) if r is at an annual rate, n as the account number, the principal and interest of current deposit and: P=1000 * (1 + r/4) 4 n times, specification: 1000 * (1 + r/4) is the principal and interest and a quarter,

CodePudding user response:

You should try to begin to write out the questions to ask

CodePudding user response:

What can't? Primary school mathematics is not it?

CodePudding user response:

reference 1st floor Italink response:
you should write, try to make it out of the question to ask oh

You should try to make it, write a question to ask oh

#include
Int main ()
{int n=5;
Float r=0.0035, p;
P=1000 * pow ((1 + r/4), 4 n);
Printf (" % 2 f, p);
return 0;

}

CodePudding user response:

reference 1st floor Italink response:
you should write, try to make it out of the question to ask oh

You should try to make it, write a question to ask oh

Compilation is not successful, don't know if it is wrong,

CodePudding user response:

reference weixin_45501932 reply: 3/f
Quote: refer to 1st floor Italink response:
you should write, try to make it out of the question to ask oh

You should try to make it, write a question to ask oh

#include
Int main ()
{int n=5;
Float r=0.0035, p;
P=1000 * pow ((1 + r/4), 4 n);
Printf (" % 2 f, p);
return 0;

}

Pow function in math. H library, include it

CodePudding user response:

reference 5 floor Italink reply:
Quote: refer to the third floor weixin_45501932 response:
Quote: refer to 1st floor Italink response:
you should write, try to make it out of the question to ask oh

You should try to make it, write a question to ask oh

#include
Int main ()
{int n=5;
Float r=0.0035, p;
P=1000 * pow ((1 + r/4), 4 n);
Printf (" % 2 f, p);
return 0;

}

Pow function in math. H library, include the

How to write pow function that has been wrong

CodePudding user response:

#include Write down,

CodePudding user response:

4 n change to 4.0 * n

CodePudding user response:

refer to the eighth floor Italink response:
4 n change to 4.0 * n

, successful, thank you for your bosses

CodePudding user response:


I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10581430.html
I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10768339.html
  • Related