text: Prints average of a stream of numbers
code: function streamAvg ( $ arr , $ n ) { for ( $ i = 0 ; $ i < $ n ; $ i ++ ) { $ avg = getAvg ( $ arr [ $ i ] ) ; echo " Average ▁ of ▁ " . ( $ i + 1 ) . " ▁ numbers ▁ is ▁ " . $ avg . " ▁ STRNEWLINE " ; } return ; }