Program Dasha Uses CRT Const nmax 99 Var size array nmax of integer su

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
Program Dasha;
Uses
CRT;
Const
nmax = 99;
Var
size: array[0..nmax] of integer;
n, i, summ, count :integer;
out :real;
Begin
CLRSCR;
summ := 0;
count := 0;
Writeln('Количество учеников: ');
Readln(n);
For i:=0 to n do
Begin
Write('Ученик ', i, ' введите рост: ');
Read(size[i]);
if size[i] < 0 then
begin
summ := summ - size[i];
count := count + 1;
end;
End;
out := summ / count;
Writeln('Средний рост мальчиков: ', out);
Readln;
End.