dart实现阶乘

static double _factorial(double num){

  double factorial = 1;

  for( double i = num ; i >= 1; i-- ) {
    factorial = factorial*i ;
  }
  return factorial;


}

Leave a Reply

邮箱地址不会被公开。 必填项已用*标注

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>