#!/bin/bash

i=1
sum=0
avg=0

echo how many loops
read n

for i in  $(seq 1 $n );
do
      echo "give int $i: "
      read num
     sum=$(expr $sum + $num)
done
avg=$(expr $sum / $n)
avg=`bc <<< "scale=4; $sum/$n"`

echo sum is $sum
echo avg is $avg
