Write a program that arranges for keyboard input of an array a [1 …. 10],

Write a program that arranges for keyboard input of an array a [1 …. 10], then transforms the array, replacing all negative elements with their modules.

The first version of the program execution: Const n = 10; Var A: array [1..n] of integer; i: integer; Begin writeln (‘Enter’, n, ‘numbers’); For i: = 1 to n do read (A [i]); writeln (‘Transformed Array’); For i: = 1 to n do Begin if A [i] <0 then A [i]: = abs (A [i]); write (A [i], ”); End; End. The second variant of the program execution: Var A: array [1..10] of integer; i: integer; begin for i: = 1 to 10 do begin readln (a [i]); if a [i] <0 then a [i]: = abs (a [i]); end; for i: = 1 to 10 dowriteln (a [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.