
1个回答
展开全部
#include<stdio.h>
float solution(float x)
{
float x1,y,k;
do
{
k=6*x*x-8*x+3;
y=2*x*x*x-4*x*x+3*x-6;
x1=x-y/k;
x=x1;
}
while(fabs(y)<0.001);
return x;
}
void main()
{
float x;
x=1.5;
x=solution(x);
printf("%f\n",x);
}
float solution(float x)
{
float x1,y,k;
do
{
k=6*x*x-8*x+3;
y=2*x*x*x-4*x*x+3*x-6;
x1=x-y/k;
x=x1;
}
while(fabs(y)<0.001);
return x;
}
void main()
{
float x;
x=1.5;
x=solution(x);
printf("%f\n",x);
}
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询