unit Unitl;
interface
uses
Forms,
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Dialogs, StdCtrls, ExtCtrls, Grids, ComCtrls, Math, Gauges;
typa
TForml = class{TForm)
StatusBarl: TStatusBar;
StringGridl: TStringGrid;
Buttonl: TButton;
RadioGroupl: TRadioGroup;
Gaugel: TGauge;
procedurę FormCreate{Sender: TObject); procedurę ButtonlClick(Sender: TObject); procedur© RadioGrouplClick(Sender: TObject); private
procedurę Dodatnie; procedurę Ujemne;
{ Private declarations } public
{ Public declarations } end; const N = 4; var
Forml: TForml; implementation var
X : array[1..N,1..N] of integer;
{$R *.dfm}
procedur© TForml.Dodatnie; var
i,j : integer; sd : integer; begin
sd:= 0;
for i:=l to N do for j:=l to N do
if X[i,j] > 0 then Inc(sd);
Gaugel.MaxValue:=16;
Gaugel.MinValue:=0;
Gaugel.Progress:=sd;
Gaugel.Visible:=True; end;
procedur© TForml.Uj emne; var
i,j : integer; sd : integer; begin
sd:=0;
for i:=1 to N do for j:=1 to N do
if X[i,j] < 0 then Inc(sd);
Gaugel.MaxValue:=16;
Gaugel.MinValue:=0;
Gaugel,Progress:=sd;
Gaugel.Visible:=True; end;
procedurę TForml.FormCreate{Sender: TObject);
begin
Randomize;
StatusBarl.Panels[1].Text:=DateTimeToStr(Now); end;
procedurę TForml.ButtonlClick(Sender; TObject);