Write a program for counting the number of negative elements of an array.

The main part: in a loop with a counter, we set a condition – if the next element of the array is less than 0, then we increase the value of the counter by 1 (k: = k + 1). The last k-value is printed.
var
A: array [1..100] of real;
k, i, N: integer;
begin
for i: = 1 to N do
readln (A [i]);
k: = 0;
for i: = 1 to N do
if A [i] <0 then k: = k + 1;
writeln (‘The number of negative elements in the array is’, k);
readln
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.