Нужна блок-схема к программе
Нужна блок схема
нужна блок схема к программе unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, Grids, StdCtrls, ExtCtrls; type TForm1 = class(TForm) Button2: TButton; Memo1: TMemo; StringGrid1: TStringGrid; RadioGroup1: TRadioGroup; procedure FormCreate(Sender: TObject); procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); procedure RadioGroup1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation var A:array [1..5,1..5] of Real; k,i,j:integer; min, x:Real; {$R *.dfm} procedure TForm1.FormCreate(Sender: TObject); begin for i:=1 to 5 do StringGrid1.cells[0,i]:=IntToStr(i)+'-é ðÿä '; for j:=1 to 5 do StringGrid1.cells[j,0]:=IntToStr(j)+'-é ñòîëáåö '; end; procedure TForm1.Button1Click(Sender: TObject); begin min:=a[1,1]; for i:=1 to 5 do if a[i,i]<min then min:=a[i,i]; k:=i; Memo1.Lines.Add('min:'+FloatToStr(min)); Memo1.Lines.Add('íîìåð ñòîáöà: '+IntToStr(k)); end; procedure TForm1.Button2Click(Sender: TObject); begin For i:=1 to 5 do for j:=1 to 5 do a[i,j]:=random(50)-25; For i:=1 to 5 do for j:=1 to 5 do Stringgrid1.Cells[i,j]:=FloatToStr (A[j,i]); end; procedure TForm1.RadioGroup1Click(Sender: TObject); begin x:= random(40)+random; case radiogroup1.ItemIndex of 0: begin for i:= 1 to 5 do for j:= 1 to 5 do begin a[i,j]:= 2*x + 8; stringgrid1.Cells[i,j]:= floattostrf(a[i,j],ffnumber,4,2); x:= x+j end; end; 1: begin for i:= 1 to 5 do for j:= 1 to 5 do begin a[i,j]:= sqrt(x); stringgrid1.Cells[i,j]:= floattostrf(a[i,j],ffnumber,4,2); x:=x+j end; end; 2: begin for i:= 1 to 5 do for j:= 1 to 5 do begin a[i,j]:= x/3+x*3; stringgrid1.Cells[i,j]:= floattostrf(a[i,j],ffnumber,4,2); x:=x+j end; end; end; end; end. |
Часовой пояс GMT +4, время: 08:19. |
Powered by vBulletin® Version 4.5.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.