Turbo pascal | Sololearn: Learn to code for FREE!


Turbo pascal

Turbo pascal Given a linear array of n-elements Determine the mean among the positive elements of an array

12/23/2020 6:57:54 AM


1 Answer

New Answer


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!