A numeric array with 15 elements is specified. Count and display the number of elements in an array
August 3, 2021 | education
| A numeric array with 15 elements is specified. Count and display the number of elements in an array that are less than its first element.
var a: array [1..15] of integer;
i, col: integer;
begin
writeln (‘Fill the array from the keyboard’);
for i: = 1 to 15 do readln (a [i]);
writeln (‘We count the number of elements that are less than the first’);
for i: = 2 to 15 do if a [i] <a [1] then col: = col + 1;
writeln (‘The number of items less than the first:’, col);
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.