fork download
  1. fact=1
  2. for((number=1;number<=$1;number++))
  3. do
  4. fact=$(($fact*$number))
  5. done
  6. echo the fact of $1 is $fact
Success #stdin #stdout #stderr 0.01s 5284KB
stdin
Standard input is empty
stdout
the fact of is 1
stderr
./prog.sh: line 2: ((: number<=: syntax error: operand expected (error token is "<=")