永发信息网

C++函数求助 poly (double __x, int __degree, double *__coeffs);

答案:1  悬赏:70  手机版
解决时间 2021-04-04 21:53
  • 提问者网友:眉目添风霜
  • 2021-04-04 10:46
C++函数求助 poly (double __x, int __degree, double *__coeffs);
最佳答案
  • 五星知识达人网友:患得患失的劫
  • 2021-04-04 11:19
函数名: poly
功 能: 根据参数产生一个多项式
用 法: double poly(double x, int n, double c[]);
程序例:

#include
#include



int main(void)
{
double array[] = { -1.0, 5.0, -2.0, 1.0 };
double result;

result = poly(2.0, 3, array);
printf("The polynomial: x**3 - 2.0x**2 + 5x - 1 at 2.0 is %lf\n",
result);
return 0;
}
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯