An array of 10 integers filled with random numbers from the interval [-15; 15] is given.

An array of 10 integers filled with random numbers from the interval [-15; 15] is given. Determine whether the product of array elements with odd ordinal numbers is an even number.

program ch;
var a: array [1..10] of integer;
i: integer;
b: boolean;
begin
b: = false;
randomize;
for i: = 1 to 10 do
begin
a [i]: = random (31) -15; // fill the array with numbers
write (a [i], ”); // print array elements
if (i mod 2> 0) and (a [i] mod 2 = 0) then b: = true;
// If the element number is odd, and the element itself is an even number,
// then the product will be even. Parity
// variable b will be set to true.
// If there are several even elements in odd places, then
// variable b will be validated multiple times, // it won’t get false.
end;
writeln ();
if b then write (‘Product is even number’)
else write (‘Product is an odd number’)
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.