You are given an array A of integers consisting of 15 elements. fill in from the keyboard: find the number

You are given an array A of integers consisting of 15 elements. fill in from the keyboard: find the number of the first negative element divisible by 5 with a remainder of 2.

program zz1;
const n = 15; // set the number of elements in the array
var i, k: integer; // set variables of integer type
a: array [1..n] of integer;
begin
for i: = 1 to n do // get n numbers from the keyboard and write them into an array
read (a [i]);
for i: = 1 to n do
if (a [i] mod 5 = 2) and (a [i] <0) then begin k: = i; break; end; // check if the number when dividing by five gives a remainder of two and it is negative, then remember its number
write (‘the number of the first negative element divisible by 5 with a remainder of 2 =’, k);
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.