Upload files to "OS/bash/Week3"

This commit is contained in:
Aadit Agrawal 2025-01-17 10:49:39 +05:30
parent 49b7d5d30c
commit e27e2c7837
5 changed files with 76 additions and 0 deletions

12
OS/bash/Week3/addq2.sh Normal file
View file

@ -0,0 +1,12 @@
#!/bin/bash
echo "Enter a number"
read no
fact=1
for((i=1;i <= no; i++));do
fact=$((fact*i))
done
echo "The factorial is $fact"