Write it as a pascal program. In array A (5), count the number of positive and negative elements.

program zz1;
const n1 = 15; // set the number of numbers in the array
var z: array [1..n1] of integer;
i, s1, k1: integer;
begin
for i: = 1 to n1 do // get n random numbers and write them into an array
z [i]: = random (21) -10;
for i: = 1 to n1 do // organize a loop in which we iterate over all the ‘array elements
begin
if z [i]> 0 then k1: = k1 + 1;
if z [i] <0 then s1: = s1 + 1;
end;
writeln (‘the number of array elements is negative =’, s1); // display the answer
writeln (‘the number of array elements is positive =’, k1);
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.