# Given an array of 10 elements, get a new array, each element of which is 2 times larger than the previous one.

March 31, 2021 | education

| program zz1;

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

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

m: array [1..n] of integer; // describe an integer array with n elements

begin

m [1]: = 12; // set the value of the first element

for i: = 2 to n do // get n-1 numbers by doubling the previous one and write the resulting value into an array

m [i]: = m [i-1] * 2;

for i: = 1 to n do // display the resulting array on the screen

write (m [i], ”);

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.