public static double sqrt(double a)
{
double x1= 0.0;
double x2 =a/2;

while(x1!=x2)
{
x1=x2;
System.out.println(a/x1);
x2=(x1+a/x1)/2;
}
return x1;
}

6×9的的方格中,起点的左下角,终点在右上角,从起点到终点,只能从下向上,从左向右走,问一共有多少种不同的走法。
A.  4200
B.   5005
C.  1005
D.  以上都不正确

public static int func(int m, int n){

int sum =0;

if(m==0 || n==0){
sum+=1;
}else if(m==1 || n==1){
sum+=m+n;
}else{
for(int i=n;i>=0;i--){
sum+=func(m-1,i);
}
}

return sum;
}

相关文章:

  • 2021-06-09
  • 2021-12-28
  • 2021-10-01
  • 2022-12-23
  • 2022-12-23
  • 2021-12-25
猜你喜欢
  • 2022-12-23
  • 2022-02-17
  • 2021-05-01
  • 2022-12-23
  • 2022-01-11
  • 2022-12-23
  • 2021-11-17
相关资源
相似解决方案