An array of 10 elements is filled with random integers from -10 to 10. Write a program

An array of 10 elements is filled with random integers from -10 to 10. Write a program that determines the number of even elements

var
i, n: integer; // declare variables of integer type.
arr: array [1..10] of integer; // declare an array.
s: string; // declare a variable of string type.
begin
for i: = 1 to 10 do // start of the cycle.
begin
arr [i]: = random (-10, 10); // fill the array element with a number from the range -10; ten.
s: = s + inttostr (arr [i]) + ”; // write the array to one line.
if (arr [i] mod 2 = 0) then n: = n + 1; // count the sum of positive numbers.
end;
writeln (‘Original array:’, s); // display the string to the screen.
writeln (‘The number of even elements is:’, n); // display the string to the screen.
end.



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.