Const n=3; var a:array[1..n] of integer; s1,s2,i:integer; begin writeln('vvedite tri cisla='); for i := 1 to n do readln(a[i]); s1:=0; s2:=0; for i := 1 to n do if a[i]>0 then s1:=s1+sqr(a[i])*a[i] else s2:=s2+sqr(a[i]); writeln('s1=',s1,' s2=',s2); readln; end.
var a:array[1..n] of integer;
s1,s2,i:integer;
begin
writeln('vvedite tri cisla=');
for i := 1 to n do
readln(a[i]);
s1:=0;
s2:=0;
for i := 1 to n do
if a[i]>0 then s1:=s1+sqr(a[i])*a[i] else s2:=s2+sqr(a[i]);
writeln('s1=',s1,' s2=',s2);
readln;
end.