var
n,s,i : integer;
begin
s:=0; i:=0;
write('N = '); read(n);
while n <> i do
i:=i+1;
s:=s+i;
end;
writeln('Сумма ', n, ' чисел = ',s);
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
var
n,s,i : integer;
begin
s:=0; i:=0;
write('N = '); read(n);
while n <> i do
begin
i:=i+1;
s:=s+i;
end;
writeln('Сумма ', n, ' чисел = ',s);
end.