# Write a program that fills the array a [1..10] with random integers in the range from 1 to 10

Write a program that fills the array a [1..10] with random integers in the range from 1 to 10, then transforms it, increasing all odd-valued elements three times, and replacing even-valued elements with 0.

The solution of the problem:
Cohn is written in PascalABC.NET program.
var a: array [1..10] of integer;
i: integer;
begin
randomize;
write (‘Initial array:’);
for i: = 1 to 10 do
begin
a [i]: = random (1, 10); // The array is filled with arbitrary integers in the range from 1 to 10.
write (a [i], ”); // This procedure displays the array numbers on the screen, separated by a space in a line.
end;
writeln;
write (‘Transformed array:’);
for i: = 1 to 10 do
begin
if odd (a [i]) = true then begin
a [i]: = a [i] * 3;
write (a [i], ”);
end
else begin
a [i]: = 0;
write (a [i], ”);
end;
end;
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.