# A sequence of numbers is given, among which there is one zero. Print all numbers up to and including zero. ABCPascal

March 29, 2021 | education

| program zz1;

const n = 13; // set the number of elements in the array

R: array [1..n] of integer = (26, -53, 10, -67, 12, -34, 20, 90, 14, -78, 0, -45, 66); // set a sequence of numbers

var i, k: integer; // set variables of integer type

begin

for i: = 1 to n do // organize a loop in which we iterate over all the elements of the array

begin

if R [i] = 0 then k: = i; // check if the element is zero, then remember its number

end;

for i: = 1 to k do // organize a loop in which we iterate over all the elements of the array to zero

write (”, R [i]); // 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.