Var n,i,p, sum: integer; a: array [1..10] of integer; begin p:=1; sum:=0; for i:=1 to 10 do begin read (a[i]); if a[i]>0 then p:=p* a[i] ; if a[i]<0 then sum:=sum+a[i]; if a[i] mod 5=0 then n:=n+1; end; writeln ('kratno 5=',n); writeln ('summa=',sum); writeln ('proizvedeniel=',p); end.
#include <stdio.h>
int main(void)
{int k=0,s=0,p=1;
for(int i=-10;i<11;i++)
{if(i%5==0)
k++;
if(i<0)
s=s+i;
if(i>0)
p=p*i;}
printf("%d %d %d",k,s,p);
return 0;}
n,i,p, sum: integer;
a: array [1..10] of integer;
begin
p:=1;
sum:=0;
for i:=1 to 10 do
begin
read (a[i]);
if a[i]>0 then p:=p* a[i] ;
if a[i]<0 then sum:=sum+a[i];
if a[i] mod 5=0 then n:=n+1;
end;
writeln ('kratno 5=',n);
writeln ('summa=',sum);
writeln ('proizvedeniel=',p);
end.