Program chik; const n=15; var P:array[1..15]of real; i:integer; s:real; begin s:=0; for i:=1 to n do begin read(p[i]); if(i mod 2=0)and(p[i]<0)then s:=s+p[i]; end; writeln(s); end. 2) program gt; uses crt,graphabc; const n=7; var mac1,mac2,mac3:array[1..15]of real; i,k1,k2:integer; begin k1:=0;k2:=0; for i:=1 to n do begin read(mac1[i]); if(mac1[i]>0)then begin Inc(k1); mac2[k1]:=mac1[i]; end; if(mac1[i]<0)then begin Inc(k2); mac3[k2]:=mac1[i]; end; end; for i:=1 to n do write(mac1[i],' '); writeln; for i:=1 to k1 do write(mac2[i],' '); writeln; for i:=1 to k2 do write(mac3[i],' '); end.
const n=15;
var P:array[1..15]of real;
i:integer;
s:real;
begin
s:=0;
for i:=1 to n do
begin
read(p[i]);
if(i mod 2=0)and(p[i]<0)then s:=s+p[i];
end;
writeln(s);
end.
2)
program gt;
uses crt,graphabc;
const n=7;
var mac1,mac2,mac3:array[1..15]of real;
i,k1,k2:integer;
begin
k1:=0;k2:=0;
for i:=1 to n do
begin
read(mac1[i]);
if(mac1[i]>0)then begin
Inc(k1);
mac2[k1]:=mac1[i];
end;
if(mac1[i]<0)then begin
Inc(k2);
mac3[k2]:=mac1[i];
end;
end;
for i:=1 to n do
write(mac1[i],' ');
writeln;
for i:=1 to k1 do
write(mac2[i],' ');
writeln;
for i:=1 to k2 do
write(mac3[i],' ');
end.
Uses GraphABC;
Begin
SetWindowSize(600,400);
line(250,100, 300,50);
lineto(350,100);
lineto(250,100);
floodfill(300,70, clgreen);
line(220,200, 300,100);
lineto(380,200);
lineto(220,200);
floodfill(300,150, clgreen);
line(200,300, 300,200);
lineto(400,300);
lineto(200,300);
floodfill(300,250, clgreen);
rectangle(290, 300,310, 320);
floodfill(300,305, clbrown);
line(0, 300, 100, 350);
lineto(200, 320);
lineto(400, 320);
lineto(600, 370);
lineto(600,400);
lineto(0,400);
lineto(0,300);
end.