Minggu, 19 Desember 2010

Ni screenshout running programnya N source code nya :


unit Unit1
;

interface

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

type
  TForm1 = class(TForm)
    StringGrid1: TStringGrid;
    StringGrid2: TStringGrid;
    Button1: TButton;
    StringGrid3: TStringGrid;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var x,y,w : integer;
arr1 : array [0..2,0..2] of integer;
arr2 : array [0..2,0..2] of integer;
arrhasil : array [0..2,0..2] of integer;
begin
//powered by : http://mpc-crew.co.cc/

  for y := 0 to 2 do
    begin
      for x := 0 to 2 do
        begin
          arr1[y,x] := StrToInt(StringGrid1.Cells[y,x]);
          arr2[y,x] := StrToInt(StringGrid2.Cells[y,x]);
        end;
      end;

  for w := 0 to 2 do
    begin
      for y := 0 to 2 do
        begin
          arrhasil[w,y] := 0;
          for x := 0 to 2 do
            begin
              arrhasil[w,y] := arrhasil[w,y] + arr1[x,w]*arr2[y,x];
            end;
        end;
    end;

  for y := 0 to 2 do
    begin
      for x := 0 to 2 do
        begin
          stringGrid3.Cells[x,y] := IntToStr(arrhasil[y,x]);
        end;
    end;

end;
end.
Jika masih bingunk download source codenya  disini
Categories:

5 komentar: