unit Unit4;

interface

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

type
  TForm4 = class(TForm)
    RadioGroup1: TRadioGroup;
    Label1: TLabel;
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form4: TForm4;

implementation

uses Unit5;

{$R *.dfm}

procedure TForm4.Button1Click(Sender: TObject);
var punkt:integer;
begin
  punkt:=0; //jesli nic nie wybrano to punkt=0
  //za prawidlowa odpowiedz 1 punkt
  case Radiogroup1.ItemIndex of
  0: punkt:=0;
  1: punkt:=1;
  2,3: punkt:=0;
  end;
 // suma_punktow:=suma_punktow+punkt;
  //lub
  Form5.Label1.caption:=InttoStr(StrtoInt(Form4.Label1.caption)+punkt);
  Form5.Show;
  Radiogroup1.ItemIndex:=-1;  //wykasowanie zaznaczenia
  Form4.hide;//Visible:=false;
end;


end.
