Home
Category
_DSA
_VScode
Home
ShellCode
Shell program to calculate the factorial of a number
Shell program to calculate the factorial of a number
sukhendu
April 13, 2022
Shell program to calculate the factorial of a number
echo "Enter a number"
read num
fact=1
while [ $num -gt 1 ]
do
fact=$((fact * num)) #fact = fact * num
num=$((num - 1)) #num = num - 1
done
echo $fact
ShellCode
Post a Comment
0 Comments
Social Plugin
Most Popular
Tags
AI
Blogging
COA LAB
DAA
DSA
Earning
M.tech
open-source
Placements
ShellCode
VHDL
vscode
Web Development
Xilinx
Categories
Search This Blog
September 2022
1
June 2022
7
May 2022
5
April 2022
9
Report Abuse
About Me
sukhendu
View my complete profile
Ad Code
Responsive Advertisement
Contact form
0 Comments