02.01.2011, 19:05
|
Активный
|
|
Регистрация: 08.04.2008
Адрес: Нижний новгород
Сообщения: 311
Репутация: 38
|
|
PHP код:
Program prim; var a,c: array [1..1000] of integer; i,kol,n,b:integer; s:real; begin writeln('Vvedite n:'); read(n); writeln('Vvedite elementy massiva:'); for i:=1 to n do read(a); writeln('Vvedite b:'); read(b); i:=1; s:=0; while i<=n do begin if a >= b then begin inc(kol); end; i:=i+2; end; s:=s/kol; writeln('Srednee arifmeticheskor ravno ',s:6:2); end.
|