unit UnitInput;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ExtCtrls, StdCtrls;

type
  TFormInput = class(TForm)
    edA: TEdit;
    edB: TEdit;
    edC: TEdit;
    btOk: TButton;
    GroupBox: TGroupBox;
    CheckBoxP: TCheckBox;
    CheckBoxS: TCheckBox;
    procedure btOkClick(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
   a, b, c: integer;
    { Public declarations }
  end;

var
  FormInput: TFormInput;

implementation

{$R *.dfm}

procedure TFormInput.btOkClick(Sender: TObject);
begin
if (edA.Text = '')or
   (edB.Text = '')or
   (edC.Text = '')or
   ((CheckBoxP.Checked or CheckBoxS.Checked) = false) then ShowMessage('ERROR!')
else
 begin
  a:= strtoint(edA.Text);
  b:= strtoint(edB.Text);
  c:= strtoint(edC.Text);
  close;
 end;
end;

procedure TFormInput.FormCreate(Sender: TObject);
begin
edA.Text:= inttostr(a);
edB.Text:= inttostr(b);
edC.Text:= inttostr(c);
end;

end.
