Write a program that fills the array a [1..10] with random integers in the range from 1 to 10 and finds the number of elements

Write a program that fills the array a [1..10] with random integers in the range from 1 to 10 and finds the number of elements that are greater than their neighbor to the left.

The neighbor on the left will have a sequence number less than one than the element in question. If the number of the element under consideration is n, then the number of its neighbor will be (n – 1).
It should be taken into account that the element with the ordinal number 1 will not have such a neighbor.
From this it follows that we must consider all the elements, starting with the second.
Let’s create an array a with 10 elements:
var a: array [1..10] of integer;
Let’s fill it with numbers from 0 to 50 using random ():
for i: integer≔1 to 10 do
a [i] ≔ random (50);
Let’s check the main condition:
for i: integer≔2 to 10 do
if (a [i]> a [I + 1]) then
col_chtvo ≔ col_chtvo + 1;



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.