С объяснением пожалуйста
var k, m, num: integer;
Dat: array[1..10] of integer;
begin
Dat[1]:=-7; Dat[2]:= -8;
Dat[3]:= 3; Dat[4]:= 6;
Dat[5]:= -4; Dat[6]:= 3;
Dat[7]:= 5; Dat[8]:= 5;
Dat[9]:= 7; Dat[10]:= 1;
num:= 1; m:= Dat[1];
for k:= 2 to 10 do begin
if Dat[k] * m < 0 then
begin
m:= Dat[k]; num:= k
end
end;
write(m);
end.
Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Answers & Comments


Copyright © 2024 SCHOLAR.TIPS - All rights reserved.