You are viewing a single comment's thread. Return to all comments →
read N sum=0 for ((i=1;i<=N;i++));do read int ((sum+=int)) done ((val=sum/N)) printf "%.3f" $val
What seems to be an issue here?
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 →
read N sum=0 for ((i=1;i<=N;i++));do read int ((sum+=int)) done ((val=sum/N)) printf "%.3f" $val
What seems to be an issue here?