program trungbinhcong;
uses crt;
var a: array[1..80]of integer; tb: real; tong: integer; i,n,sl: byte; begin clrscr; writeln('nhap n: '); readln(n); for i:= 1 to n do begin writeln('nhap a[',i,']: '); readln(a[i]); end; tong:=0; sl:=0; for i:= 1 to n do if (a[i] mod 2 <> 0) then begin sl:=sl+1; tong:=tong+a[i]; end; tb:=tong/sl; writeln('trung binh cong cua cac phan tu le trong mang la: ', tb:4:3); readlnend.