You are viewing a single comment's thread. Return to all comments →
read n s=0 for i in $(seq 1 $n) do read m s=$(( s+m )) done s=$(echo "scale=4; $s / $n" | bc) printf "%.3f" "${s}"
Seems like cookies are disabled on this browser, please enable them to open this website
Compute the Average
You are viewing a single comment's thread. Return to all comments →