var num,s :real;
begin
s:= 0;
while true do
write('Введите число: ');
readln(num);
if num >= 0 then s:= s + num
else break;
end;
writeln('Сумма = ', s)
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
var num,s :real;
begin
s:= 0;
while true do
begin
write('Введите число: ');
readln(num);
if num >= 0 then s:= s + num
else break;
end;
writeln('Сумма = ', s)
end.