2 comments:

  1. $num1=$_POST["num"];
    $sum=0;
    $i=$num1;
    while($i!=0)
    {
    $j=1;
    $fact=1;
    while($j!=$i+1)
    {
    $fact*=$j;
    $j++;
    }
    $sum+=$fact;
    $i--;
    }
    echo "$sum";

    ReplyDelete
  2. php
    $number=$_POST['num'];
    $sum=0;
    $f=1;
    for($i=1;$i<=$number;$i++)
    {$f=$f*$i;
    $sum=$sum+$f;
    }
    echo"sum of factorial series is:$sum";
    ?>

    ReplyDelete