var
x,s : integer;
begin
s := 0;
x := 1;
while x <> 0 do
readln(x);
if x mod 10 = 5 then
s := s + x;
end;
writeln(s);
end.
var a,k:integer;
k:=0;
repeat begin
readln(a);
if a mod 10 = 5 then k:=k+a;
until a=0;
writeln(k);
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
var
x,s : integer;
begin
s := 0;
x := 1;
while x <> 0 do
begin
readln(x);
if x mod 10 = 5 then
s := s + x;
end;
writeln(s);
end.
var a,k:integer;
begin
k:=0;
repeat begin
readln(a);
if a mod 10 = 5 then k:=k+a;
end;
until a=0;
writeln(k);
end.