#include<stdio.h>
#include<stdlib.h>
#include<math.h>
int main()
{
 double x1=0,x2=1.0;
 int a;
 system("color 3E");
 printf(" 输入你要求的数\n");
 scanf("%d",&a);
 while(fabs(x2-x1)>1e-5)
 {
  x1=x2;
  x2=0.5*(x2+a/x2);
 }
 printf("所求为%.4lf\n",x2);
 return 0;
}