相关疑难解决方法(0)

帮助 C++ 中的 POW 函数

我在使用 pow 函数时遇到问题。该方程是A=P*((1+R)/T)^T“^”的幂。我将如何使用 pow 函数,我只看到 4 到 5 次方的示例,与我必须做的完全不同

c++ math

1
推荐指数
1
解决办法
328
查看次数

方程在C++中无法正常工作

//Samuel LaManna
//Program 1 (intrest rate)
/*Variables:
Principal=P
Interest Rate=R
Times Compounded=T
Answer=A */

#include <iostream>                                                                        //Input/output

using namespace std;

int main ()
{
  int P, R, T, A;                                                                          //Declaring Variables
  cout<<endl;
  cout<<"Interest Earned Calculator";                                                      //Prints program title
  cout<<endl;
  cout<<endl;
  cout<<"Please enter the Principal Value: ";
  cin >> P;
  cout<<endl;
  cout<<endl;
  cout<<"Please enter the Interest Rate (in decimal form): ";
  cin >> R;
  cout<<endl;
  cout<<endl;
  cout<<"Please enter the Number of times the interest is compounded in a year: ";
  cin …
Run Code Online (Sandbox Code Playgroud)

c++

-2
推荐指数
1
解决办法
618
查看次数

标签 统计

c++ ×2

math ×1