Пож 1 составить программу, которая бы запрашивала хнач , хкон , шаг c и определяла сумму всех отрицательных чисел от хнач до хкон с шагом с (решить , используя цикл с предусло-вием – while .. do).
Program project1; uses crt,math; var s:real; i,j,f:real; a:integer; begin writeln('vvedite 1 chislo ');readln(i); writeln('vvedite 2 chislo ');readln(j); writeln('vvedite 3 chislo ');readln(f); s:=i; if j<s then s:=j; if f<s then s:=f; if s<0 then begin if i<0 then inc(a); if j<0 then inc(a); if f<0 then inc(a); writeln('kolichestvo otricatelnix ',a:2); end else begin if i>0 then i:=i*-1; if j>0 then j:=i*-1; if f>0 then f:=i*-1; end; writeln('min chislo ',s:2:0); readln; end.
x0, x1, c, sum: integer;
begin
sum:=0;
readln(x0, x1, c);
while x0<=x1 do
begin
sum:=sum+x0;
x0:=x0+c;
end;
writeln(sum);
end.