Time pass to be honest,may work as a reference later,I am not sure.
read -rep $'enter the number whose factorial you want\n' fact && result=1 && for i in $(seq 1 $fact) ;do result=$((result*i));done && echo $result
read -rep $'enter number\n' num && (echo 1; seq $num) | paste -s -d "\*" | bc
No comments:
Post a Comment