1递增5次,用递归的方式实现

response.write(sum(0,1));

protected int sum(int t, int value)
    {
        int h;       
        for (h = t; h < 5; )
        {
            h++;
            value++;           
            sum(h, value);
        }
        return value;
    }

相关文章:

  • 2021-09-04
  • 2022-12-23
  • 2021-12-15
  • 2022-12-23
  • 2022-12-23
  • 2022-03-05
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-09
  • 2021-09-04
  • 2021-04-26
  • 2021-11-28
  • 2022-12-23
  • 2021-10-10
  • 2021-05-25
相关资源
相似解决方案