You are viewing a single comment's thread. Return to all comments →
read n summary=0 for i in `seq 1 $n`; do read temp; summary=$((summary + temp)); done printf %.3f $(echo "$summary / $n" | bc -l)
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 →