Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

calculefactorail en bash

function factorial {
  typeset n=$1
  (( n < 2 )) && echo 1 && return
  echo $(( n * $(factorial $((n-1))) ))
}
Source by askcodez.com #
 
PREVIOUS NEXT
Tagged: #calculefactorail #en #bash
ADD COMMENT
Topic
Name
3+7 =