You are given a one-dimensional integer array filled from the keyboard.
March 13, 2021 | education
| You are given a one-dimensional integer array filled from the keyboard. form a new array from the values of the original array greater than 20 and having indices that are multiples of 10.
var a: array [1..100] of integer;
b: array [1..100] of integer;
n, i, sum: integer;
begin
writeln (‘Enter the number of elements in the array’);
readln (n);
writeln (‘Fill the array from the keyboard’);
for i: = 1 to n do readln (a [i]);
for i: = 1 to n do if (i mod 10 = 0) and (a [i]> 20) then sum: = sum + 1;
writeln (‘The number of elements is more than 20 and with indices divisible by 10 is equal to’, sum);
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.