Write a program for calculating in array A (10), filled with random numbers from the interval [0, 10]

Write a program for calculating in array A (10), filled with random numbers from the interval [0, 10], the number of elements less than 5.

var
i, n: integer; // declare variables of integer type.
arr: array [1..10] of integer; // declare an array.
s: string; // declare a variable of string type.
begin
for i: = 1 to 10 do // start of the cycle.
begin
arr [i]: = random (0, 10); // fill the array with random numbers from the range 0; ten.
s: = s + inttostr (arr [i]) + ” // write the array to a string;
if arr [i] <5 then n: = n + 1; // count the number of elements less than five.
end;
writeln (‘Array:’, s); // display the array.
writeln (‘Number of elements less than five:’, n); // display the value of the variable n.
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.