Program Dasha Uses CRT Begin CLRSCR Var size array of real summ count

 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
Program Dasha;
Uses
CRT;
Begin
CLRSCR;
Var
size: array[0..n] of real;
n, i, summ, count :integer;
out :real;
Writeln('Количество учеников');
Readln(n);
For j:=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);
End;