Write a shell script to find the factorial of the given number n.

 

  Write a shell script to find the factorial of the
     given  number n.


Program =

 

#!/bin/bash

echo "Enter number of factorial = "

read no

fact=1

for ((i=1; i<=no; i++))

do

fact=$((fact * i))

done

echo "$fact"


Output =





if
  you are seeing White lines on your screen dont Worry due to some error .....

    select all the code and paste in particular editor ..

now its visible