An array of N elements is given. Form a new array, the elements of which

An array of N elements is given. Form a new array, the elements of which will be the values of the original array not exceeding the specified Z value.

program zz1;
const n = 50; // set the number of elements in the array
var i, z, k: integer; // set variables of integer type
m, v: array [1..n] of integer;
begin
write (‘enter the given number Z’);
read (z);
for i: = 1 to n do // get n random numbers and write them into an array
m [i]: = random (21);
for i: = 1 to n do // display the resulting array on the screen
write (m [i], ”);
writeln; // go to a new line to display the response
for i: = 1 to n do
if m [i] <z then begin k: = k + 1; v [k]: = m [i]; end;
writeln (‘New array:’); // display the answer
for i: = 1 to k do
write (v [i], ”);
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.