type
TForm1 = class(TForm)
Label1: TLabel;
Edit1: TEdit;
Button1: TButton;
Label2: TLabel;
Label3: TLabel;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var p:array[1..10000] of integer;
k,i,N:integer;
proc:real;
begin
N:=strtoint(Edit1.text);
k:=0;
for i:=1 to N do
begin
p[i]:=strtoint(InputBox('Заголовок окна', 'Введите целое число:', ''));
if p[i] mod 2 <>0 then k:=k+1;
end;
proc:=k/N*100;
Label2.Caption:=floattostr(proc)+'%';
end;