int n = 1, sum = 5;
        int i, j;
        int b = 0;//记录循次数
        int []bb =new int[15];
        for (j = 1; j <= sum; j++)
        {
            for (i = 1; i <= j; i++)
            {
                n = n * i;
                b++;
                bb[i] = j;
            }
            if (j == sum)
           Response.Write(n.ToString());
            n = 1;
        }
        //Response.Write(b.ToString());//15
        for (int t = 0; t < bb.Length; t++)
        {
            Response.Write("--" + bb[t].ToString());//120--0--5--5--5--5--5--0--0--0--0--0--0--0--0--0
 
        }

相关文章:

  • 2021-10-17
  • 2021-12-30
  • 2021-10-15
  • 2021-08-25
  • 2021-04-25
  • 2022-02-21
猜你喜欢
  • 2021-11-28
  • 2021-08-31
  • 2021-06-24
  • 2021-04-25
  • 2021-12-26
  • 2022-02-08
  • 2021-11-08
相关资源
相似解决方案