An array of 30 elements is given. fill it with random numbers in the range from 0 to 1000. Print the original array to the screen.

An array of 30 elements is given. fill it with random numbers in the range from 0 to 1000. Print the original array to the screen. Find the sum and product of array elements that are multiples of 3 and even.

program zz1;
const n = 30; // set the number of numbers in the array
var i, k, s: integer; // set variables of integer type
m: array [1..n] of integer;
begin
for i: = 1 to n do // get n random numbers and write them into an array
m [i]: = random (1001);
for i: = 1 to n do // display the original array on the screen
write (m [i], ”);
writeln; // go to a new line to display the response
for i: = 1 to n do
begin
if (m [i] mod 3 = 0) and (m [i] mod 2 = 0) then k: = k + 1;
if (m [i] mod 3 = 0) and (m [i] mod 2 = 0) then s: = s + m [i];
end;
writeln (‘number of items found =’, k);
write (‘sum of found elements =’, s);
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.