Get Update on recent Technology & Programming

Sunday, 29 October 2017

Shell Script Program To Find Factorial of Any Number

Posted by   on Pinterest

Shell Script Program To Find Factorial of Any Number 




 echo Enter a number  
 read num  
 i=1  
 fact=1  
 while [ $i -le $num ]  
 do  
  fact=`expr $fact \\* $i`  
  i=`expr $i + 1`  
 done  
 echo Factorial of $num is $fact  

No comments:
Write comments

Hey, we've just launched a new custom color Blogger template. You'll like it -
Join Our Newsletter