Fill an array of 10 elements with random numbers in the interval [0..4] and display the numbers

Fill an array of 10 elements with random numbers in the interval [0..4] and display the numbers of all elements equal to X. An example of the program: Initial array: 4 0 1 2 0 1 3 4 1 0 What are we looking for? 0 A [2], A [5], A [10]

Program massiv;
var
A: array [1..10] of integer;
i, x: integer;
begin
readln (x); {entering the number x from the keyboard}
for i: = 1 to 10 do
begin
A [i]: = random (4);
write (A [i], ”); {displaying array A in a line}
end;
writeln;
for i: = 1 to 10 do
begin
if A [i] = x then
writeln (i); {displaying indexes i in a column}
end;
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.