Write a shell program to print factorial of numbers between one to fifty.
Answers
Answered by
0
#shell script to find average of n numbers
echo "Enter Size(N)"
read N
i=1
sum=0
echo "Enter Numbers"
while [ $i -le $N ]
do
read num #get number
sum=$((sum + num)) #sum+=num
i=$((i + 1))
done
avg=$(echo $sum / $N | bc -l)
echo $avg
Similar questions
Hindi,
6 months ago
India Languages,
6 months ago
History,
11 months ago
Accountancy,
11 months ago
Geography,
1 year ago
English,
1 year ago
Art,
1 year ago