Telekommunikatsiya texnologiyalar davlat
Ўйинларнинг тўлов матрицасини minmax ва maxminни
Download 1.08 Mb.
|
Kitob 7693 uzsmart.uz
2.4 Ўйинларнинг тўлов матрицасини minmax ва maxminни
аниқловчи ва даминантлик усули дастурий таьминоти Дастур матни unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, Buttons, Grids, Menus, XPMan; type TForm1 = class(TForm) MainMenu1: TMainMenu; Fayl1: TMenuItem; Chiqish1: TMenuItem; tekshirish1: TMenuItem; dominatlik1: TMenuItem; minmax1: TMenuItem; XPManifest1: TXPManifest; StringGrid1: TStringGrid; BitBtn1: TBitBtn; Edit2: TEdit; Edit1: TEdit; Label1: TLabel; Label2: TLabel; BitBtn2: TBitBtn; Label3: TLabel; Label4: TLabel; BitBtn3: TBitBtn; procedure Chiqish1Click(Sender: TObject); procedure dominatlik1Click(Sender: TObject); procedure minmax1Click(Sender: TObject); procedure BitBtn1Click(Sender: TObject); procedure BitBtn2Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; a:array[1..100,1..100] of integer; i,j,n,m:integer; f:boolean; 27
implementation
procedure TForm1.Chiqish1Click(Sender: TObject); begin Form1.Close; end; procedure TForm1.dominatlik1Click(Sender: TObject); begin Form2.ShowModal; end; procedure TForm1.minmax1Click(Sender: TObject); begin Form3.ShowModal; end; procedure TForm1.BitBtn1Click(Sender: TObject); begin n := StrToInt(Edit1.Text); m := StrToInt(Edit2.Text); StringGrid1.RowCount := StrToInt(Edit1.Text); StringGrid1.colCount := StrToInt(Edit2.Text); StringGrid1.Visible := true; BitBtn2.Visible := true; BitBtn3.Visible := true; form1.Height := 400; if (n = 2) then f := true else if (m = 2) then f := false else begin StringGrid1.Visible := false; BitBtn2.Visible := false; BitBtn3.Visible := false; form1.Height := 100; ShowMessage('2XM lik yoki nX2 matritsa kiriting!'); end; end; procedure TForm1.BitBtn2Click(Sender: TObject); 28
var
label3.Caption := 'P0 nuqtalar ['+FloatToStr(p0)+','+FloatToStr(1-p0)+']'; Label4.Caption := 'keltrilgan foyda :'+ FloatToStr(maxw)+' mln so`m'; end; end. 29
Дастурни ишлатишга йўриқнома Дастурнинг асосий интерфейси Дастурга маьлумот киритиш ойнаси 30
|
ma'muriyatiga murojaat qiling