Skocz do zawartości

tomu

Użytkownicy
  • Postów

    6
  • Dołączył

  • Ostatnia wizyta

Osiągnięcia tomu

Chicken

Chicken (1/13)

0

Reputacja

  1. mam coś takiego tylko to jest dodawanie macierzy, jak to przerobić aby było to mnożenie macierzy unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, Grids; type TForm1 = class(TForm) m1: TStringGrid; m2: TStringGrid; suma: TStringGrid; Button1: TButton; Label1: TLabel; Label2: TLabel; Edit1: TEdit; Button2: TButton; procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.Button1Click(Sender: TObject); var i,j,l:integer; begin l:=strToInt(edit1.Text); for i:=0 to l-1 do for j:=0 to l-1 do suma.cells[i,j]:=IntTostr(strToInt(m1.cells[i,j]) + strToInt(m2.Cells[i,j])); end; procedure TForm1.Button2Click(Sender: TObject); begin m1.RowCount:=strToInt(edit1.text); m1.colCount:=strToInt(edit1.text); m2.RowCount:=strToInt(edit1.text); m2.colCount:=strToInt(edit1.text); suma.RowCount:=strToInt(edit1.text); suma.colCount:=strToInt(edit1.text); end; end.
  2. Hej wie ktoś może jak napisać procedure mnożenia macierzy w delphi (okienkowo).
  3. tomu

    duży lotek

    temat skonczony
  4. tomu

    duży lotek

    Mam taki program tylko mam mały problem ponieważ ma mi wyświetlać liczby od 1 do 49 a wyświetla od 1 do 100. Prosze o pomoc. unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) Button1: TButton; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.Button1Click(Sender: TObject); var i,j,k:integer; Tablica:array[1..6] of integer; il:string; begin randomize; for i:=1 to 6 do begin for j:=1 to 5 do for k:=1 to 6 do begin Tablica:=random(49)+1; if (i<>k) and (Tablica=Tablica[k]) then Tablica:=random(49)+1; str(Tablica,il); Form1.Canvas.TextOut(i*20,j*20,il); end; end; end; end.
  5. tomu

    duży lotek

    A JAK TO CAŁOŚ NAPISAĆ W POSTACI OKIENKOWEJ?
  6. tomu

    duży lotek

    hej wszystkim. Wie ktos jak napisać program lotek w delphi w postaći okienkowej taki zeby losował bez powtórzeń i sprawdzał czy liczby zgadzaja się z tymi co wcześniej się wytypowało.
×
×
  • Dodaj nową pozycję...