Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

calculefactorail en bash

factorial () { 
    if (($1 == 1))
    then
        echo 1
        return
    else
        echo $(( $( factorial $(($1 - 1)) ) * $1 ))
    fi
}
Source by askcodez.com #
 
PREVIOUS NEXT
Tagged: #calculefactorail #en #bash
ADD COMMENT
Topic
Name
3+4 =