C++ power function

C++ pow function use

//使用到库文件#include<cmath>
int a;
a=(int)pow(2.2,3);
cout<<a;

The prototype of the pow function is double pow(double base, double exp)
The function of the pow function is to return the power of exp based on the parameter base. If base is 0, exp cannot be negative. If base is not 0, the value of exp is unlimited.

Supongo que te gusta

Origin blog.csdn.net/weixin_45534301/article/details/112304462
Recomendado
Clasificación