program SquareArray; var i: Integer; s, a: Real; n: array[1..15] of Integer; begin s := 0; for i := 1 to 15 do begin n[i] := i * i; s := s + n[i]; end; a := s / 15; writeln(s:0:2); writeln(a:0:2); end.
2
program RandomArray; var i: Integer; s, a: Real; n: array[1..15] of Integer; begin s := 0; a := 0; for i := 1 to 15 do begin n[i] := Random(11); s := s + n[i]; if n[i] mod 2 0 then a := a + 1; end; a := s / a; writeln(a:0:2); end.