Accountancy, asked by akashdeepsingh3042, 11 months ago

Write a shell program to print factorial of numbers between one to fifty.

Answers

Answered by Anonymous
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