Average arithmetic
To
define an average arithmetic all positive elements of a matrix (a matrix not
square) the sizes N*M (N and M it is no more 10). A matrix to
generate from random numbers in a range from-100 to 100.
Input data
The
sizes of a matrix are set by input about keyboards (integers) through ENTER.
Output data
Quantity of negative, non-negative elements are
deduced since a new line. An average arithmetic all non-negative elements are
deduced too since a new line + one blank. Value average arithmetic two signs
after a comma, for example: 2.83
Example input data
3
2
7
-6
0
0
2
-4
Example output data
2
4
2.25
The author
Bogdanova E.A.