Write a program that generates 10 random numbers in the range from 1 to 20

Write a program that generates 10 random numbers in the range from 1 to 20, prints these numbers to the screen and calculates their arephmitic mean.

program zz1;
var a, r, i: integer; // set variables of integer type
begin
for i: = 1 to 10 do // organize a loop for 10 repetitions
begin
a: = random (9) + 1; // get a random number in the range from 1 to 10
write (a, ”); // display it on the screen in a line separated by a space
r: = r + a; // calculate the sum of the numbers
end;
writeln; // go to a new line to display the response
write (‘arithmetic mean =’, r / 10); // display the answer
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.