Const n=10;
Var i:Integer ;s:real;
A:array [1..10]of Integer ;
Begin
S:=0;
For i:=1 to N do begin
A[i]:=random(19)+1;
Write (' A[', i, ']=', A[i]) ;
S:=s+A[i];
End;
Writeln;write(' s=', s/n);
End.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Const n=10;
Var i:Integer ;s:real;
A:array [1..10]of Integer ;
Begin
S:=0;
For i:=1 to N do begin
A[i]:=random(19)+1;
Write (' A[', i, ']=', A[i]) ;
S:=s+A[i];
End;
Writeln;write(' s=', s/n);
End.