uses crt;
var a,s:integer;
begin
s:=0;
writeln('Введите числа');
while a<>0 do begin
readln(a);
if (a>0) then s:=s+a;
end;
writeln('s=',s);
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
uses crt;
var a,s:integer;
begin
s:=0;
writeln('Введите числа');
while a<>0 do begin
readln(a);
if (a>0) then s:=s+a;
end;
writeln('s=',s);
end.