Program n1; Uses CRT; Var a,b,s,i: integer; begin writeln('Vvedite A i B'); readln(a,b); If a>b then for i:=b to a do begin writeln(i); s:=s+i; end else if b>a then for i:=a to b do begin writeln(i); s:=s+i; end else writeln('ravny'); writeln('Summa = ',s); readln end.
Program n1;
Uses CRT;
Var a,b,s,i: integer;
begin
writeln('Vvedite A i B');
readln(a,b);
If a>b then
for i:=b to a do
begin
writeln(i);
s:=s+i;
end
else
if b>a then
for i:=a to b do
begin
writeln(i);
s:=s+i;
end
else writeln('ravny');
writeln('Summa = ',s);
readln
end.