Ответ:
Объяснение:
var sum2,kol5,n,m:integer;
massiv:array[1..1000] of integer;
begin
readln(n); kol5:=0; sum2:=0;
for m:=1 to n do readln(massiv[m]);
for m:=1 to n do if(massiv[m] mod 5=0) then kol5:=kol5+1;
for m:=1 to n do if(m mod 2=0) then sum2:=sum2+massiv[m];
writeln(kol5,' ',sum2);
readln; end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Verified answer
Ответ:
Объяснение:
var sum2,kol5,n,m:integer;
massiv:array[1..1000] of integer;
begin
readln(n); kol5:=0; sum2:=0;
for m:=1 to n do readln(massiv[m]);
for m:=1 to n do if(massiv[m] mod 5=0) then kol5:=kol5+1;
for m:=1 to n do if(m mod 2=0) then sum2:=sum2+massiv[m];
writeln(kol5,' ',sum2);
readln; end.