RosettaCodeData/Task/Averages-Arithmetic-mean/Bc/averages-arithmetic-mean.bc

9 lines
108 B
Text
Raw Permalink Normal View History

2017-09-23 10:01:46 +02:00
define m(a[], n) {
auto i, s
for (i = 0; i < n; i++) {
s += a[i]
}
return(s / n)
}