加入头文件
#include<cmath>
原型:
示例:
#include<iostream>
#include<cmath>
using namespace std;
void main()
{
double t = pow(2, 3);
cout << t << endl;
double x = pow(2.5, 2);
cout << x << endl;
system("pause");
}
结果:
加入头文件
#include<cmath>
原型:
示例:
#include<iostream>
#include<cmath>
using namespace std;
void main()
{
double t = pow(2, 3);
cout << t << endl;
double x = pow(2.5, 2);
cout << x << endl;
system("pause");
}
结果: