C++编程时开立方怎么表达啊

来源:百度知道 编辑:UC知道 时间:2024/05/28 10:54:22

pow(x,1.0/y) 返回x的y次方根
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
int x=64,y=3;
cout <<pow(x,1.0/y);
return 0;
}

#include <math.h>
.
.
.
double x, y ;
x.
.
y=pow(x,1/3)