You are viewing a single comment's thread. Return to all comments →
Inspired by @pranitbose_15, even shorter and crisper:
read n expr=$(paste -sd '+' -) printf %.3f $(bc -l <<< "($expr)/$n")
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 →
Inspired by @pranitbose_15, even shorter and crisper: