You are viewing a single comment's thread. Return to all comments →
sum=0 read N
for (( i=1; i<=N; i++)) do read x ((sum += x)) done avg=sum / avg"
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 →
sum=0 read N
for (( i=1; i<=N; i++)) do read x ((sum += x)) done avg=sum / avg"