编写程序,键盘输入x 的值,输出多项式-4x^3+5.8X^2-2x+2.6的值。
时间: 2023-04-03 19:02:04 浏览: 154
好的,这个问题可以回答。以下是程序的代码:
#include <stdio.h>
#include <math.h>
int main()
{
float x, result;
printf("请输入x的值:");
scanf("%f", &x);
result = -4 * pow(x, 3) + 5.8 * pow(x, 2) - 2 * x + 2.6;
printf("多项式的值为:%f", result);
return ;
}
阅读全文
相关推荐















