用迭代法 求方程x=cosx得根,是误差小于10的负六.{double x1 x2;x1 = 0.0;x2 = cos(x1);while fabs(x2-x1) > (1e-6){ x1 = x2; x2 = cos(x1);}printf ("x=%f\n",x2);}求解题思路 我看不懂啊

问题描述:

用迭代法 求方程x=cosx得根,是误差小于10的负六.
{double x1 x2;
x1 = 0.0;
x2 = cos(x1);
while fabs(x2-x1) > (1e-6)
{ x1 = x2;
x2 = cos(x1);
}
printf ("x=%f\n",x2);
}
求解题思路 我看不懂啊

你是不复制放这的啊?格式都没看懂