0
Turbo pascal
Turbo pascal Given a linear array of n-elements Determine the mean among the positive elements of an array
1 Resposta
+ 2
Sergei , use a loop to iterate over the array, and use a conditional expression to build the sum of only positive values, as well as to count the number of positive values. Than divide the sum by the number of positive elements.
Happy coding!