Var
A:array[1..10] of integer;
i,n:integer;
Begin
n:=0;
For i:= 1 to 10 do
Begin
A[i]:=random(5)+1;
Write(A[i],' ');
if A[i] = 5 then n:=i;
End;
WriteLn;
if n=0 then WriteLn('Пятёрок в массиве нет')
else WriteLn(n)
End.
Var A:array[1..25] of integer;
i,n:integer;
Begin
n:=0;
For i:= 1 to 25 do
Begin
A[i]:=random(5)+1;
Write(A[i],' ');
if A[i]=1 then n:=n+1
End;
WriteLn;
WriteLn(n);
End.
Var A:array[1..15] of integer;
i:integer;
S:real;
Begin
For i:= 1 to 15 do
Begin
A[i]:=random(5)+1;
Write(A[i],' ');
S:=S+A[i]
End;
WriteLn;
WriteLn('Sr = ',S/15)
End.