An array of 15 integers filled with random numbers from the interval [-20; twenty].

An array of 15 integers filled with random numbers from the interval [-20; twenty]. Determine what is greater than the sum or product of the array elements. Pascal.

var x: array [1..15] of integer;
s, p: int64;
begin
randomize;
s: = 0; p: = 1;
for i: integer: = 1 to 15 do
begin
x [i]: = random (41) -20;
write (x [i]: 4);
s: = s + x [i];
p: = p * x [i];
end;
writeln ();
if s> p then writeln (‘Sum’, s, ‘greater than product’, p)
else if s <p then writeln (‘Sum’, s, ‘less than product’, p)
else writeln (‘Sum’, s, ‘equals product’, p)
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.