Var
A,k,n:integer;
S:real;
Begin
S:=0;
k:=0;
Write('n = ');ReadLn(n);
For n:= 1 to n do
Begin
Read(A);
if (A mod 5 = 0)and(A mod 2 <> 0) then
Begin
S:=S+A;
k:=k+1
End;
End;
WriteLn('k = ',k);
WriteLn('S = ',S);
End.
Пример работы программы:
n = 7
5
15
95
97
90
98
0
k = 3
S = 115