You are viewing a single comment's thread. Return to all comments →
read input x=0 i=0 while [[ $i -lt $input ]] do read num x=$((x+num)) i=$((i+1)) done echo $(printf %.3f $(echo "scale=4;$x/$input"|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 →