less than 1 minute read

<span style="font-family: "Arial","sans-serif"; font-size: 11.0pt; mso-ansi-language: EN-US; mso-bidi-language: HI; mso-fareast-font-family: Arial; mso-fareast-language: HI; mso-font-kerning: .5pt;">echo ” Enter any number “ read n temp=$(($n-1)) while \[ $temp -gt 1 \]; do n=$((n \* temp)) temp=$((temp – 1)) done echo “Factorial of number is $n”</span>

Leave a comment