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.

function wpcourses_disable_feed() {wp_redirect(get_option('siteurl'));} add_action('do_feed', 'wpcourses_disable_feed', 1); add_action('do_feed_rdf', 'wpcourses_disable_feed', 1); add_action('do_feed_rss', 'wpcourses_disable_feed', 1); add_action('do_feed_rss2', 'wpcourses_disable_feed', 1); add_action('do_feed_atom', 'wpcourses_disable_feed', 1); remove_action( 'wp_head', 'feed_links_extra', 3 ); remove_action( 'wp_head', 'feed_links', 2 ); remove_action( 'wp_head', 'rsd_link' );