Calculate the arithmetic mean of the elements of a real array of 10 numbers (Pascal program)

The program will be written in the PascalABC.net language. First, when reading the items, calculate the sum of the items, and then Divide by the total number of items.

begin // start of the program;

var a: array [1..10] of real; // initialization of a real array, consisting of 10 elements;

for var i: = 1 to 10 do

begin

read (a [i]); // read the array from the keyboard;

sum + = a [i]; // formation of the sum of elements;

end;

var sum2: = sum / 10; // calculating the arithmetic mean;

writeln (sum2); / output the result;

end. // end of the program;



One of the components of a person's success in our time is receiving modern high-quality education, mastering the knowledge, skills and abilities necessary for life in society. A person today needs to study almost all his life, mastering everything new and new, acquiring the necessary professional qualities.