#include
double kaifang(double x);
main()
{
double x, y;
printf("请输入一个正数n");
scanf("%lf",&x);
y=kaifang(x);
printf("%lfn",y);
}
double kaifang(double x)/*采用二分法*/
{
double y,a,b,c=1;
a=0;b=x;
while(c)
{
y=(a+b)/2.0;
if((y*y-x)*(a*a-x)
#include
double kaifang(double x);
main()
{
double x, y;
printf("请输入一个正数n");
scanf("%lf",&x);
y=kaifang(x);
printf("%lfn",y);
}
double kaifang(double x)/*采用二分法*/
{
double y,a,b,c=1;
a=0;b=x;
while(c)
{
y=(a+b)/2.0;
if((y*y-x)*(a*a-x)