Program zadacha1;
uses crt;
var s, c, i, k, n: integer;
begin
clrscr;
repeat write ('vvedite k, n: ');
readln (k, n) until ks:=0;
for i:=k to n do begin
c:=sqr(i);
s:=s+c;
end;
writeln (s);
readkey;
end.
program zadacha2;
uses crt;
var n, k, i: integer;
begin
clrscr;
repeat write ('vvedite k, n: ');
readln (k, n) until n>0;
for i:=1 to n do
writeln (k);
readkey;
end.
program zadacha3;
uses crt;
var n, c, i, count1, count2, count3: integer;
begin
clrscr;
write ('vvedite n: ');
readln (n);
count1:=0;
count2:=0;
count3:=0;
for i:=1 to n do begin
write ('vvedite chislo: ');
readln (c);
if c>0 then count1:=count1+1
else if c<0 then count2:=count2+1<br>else count3:=count3+1;
end;
writeln ('kolichestvo chisel>0 - ', count1);
writeln ('kolichestvo chisel<0 - ', count2);<br>writeln ('kolichestvo chisel=0 - ', count3);
readkey;
end.