Forum www.til2010.fora.pl Strona Główna
 FAQ   Szukaj   Użytkownicy   Grupy    Galerie   Rejestracja   Profil   Zaloguj się, by sprawdzić wiadomości   Zaloguj 

B1 następne

 
Napisz nowy temat   Odpowiedz do tematu    Forum www.til2010.fora.pl Strona Główna -> II rok 2011/2012 / Semestr III / INFORMATYKA
Zobacz poprzedni temat :: Zobacz następny temat  
Autor Wiadomość
Asia




Dołączył: 14 Paź 2010
Posty: 92
Przeczytał: 0 tematów

Skąd: Grudziądz

PostWysłany: Pią 19:57, 28 Paź 2011    Temat postu: B1 następne

unit U1710;

interface

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

type
TForm7 = class(TForm)
StringGrid1: TStringGrid;
Edit1: TEdit;
Button1: TButton;
Panel1: TPanel;
procedure FormCreate(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form7: TForm7;

implementation

{$R *.dfm}

procedure TForm7.Button1Click(Sender: TObject);
var nk,nw,suma:integer;

begin

nw:=strtoint(edit1.text);
suma:=0;
for nk := 0 to stringgrid1.Colcount-1 do
suma:=suma+strtoint(stringgrid1.cells[nk,nw]);
panel1.caption:='suma elementów w wierszu '+edit1.text+' wynosi '+inttostr(suma)

end;

procedure TForm7.FormCreate(Sender: TObject);
var i,j:integer;
begin
randomize;
for i := 0 to stringgrid1.ColCount-1 do
for j := 0 to stringgrid1.RowCount-1 do
stringgrid1.cells[i,j]:=inttostr(random(101));
end;


end.
Powrót do góry
Zobacz profil autora
Asia




Dołączył: 14 Paź 2010
Posty: 92
Przeczytał: 0 tematów

Skąd: Grudziądz

PostWysłany: Pią 19:57, 28 Paź 2011    Temat postu:

unit U1710;

interface

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

type
TForm7 = class(TForm)
StringGrid1: TStringGrid;
Edit1: TEdit;
Button1: TButton;
Panel1: TPanel;
Button2: TButton;
procedure FormCreate(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form7: TForm7;

implementation

{$R *.dfm}

procedure TForm7.Button1Click(Sender: TObject);
var nk,nw,suma:integer;

begin

nw:=strtoint(edit1.text);
suma:=0;
for nk := 0 to stringgrid1.Colcount-1 do
suma:=suma+strtoint(stringgrid1.cells[nk,nw]);
panel1.caption:='suma elementów w wierszu '+edit1.text+' wynosi '+inttostr(suma)

end;

procedure TForm7.Button2Click(Sender: TObject);
var nk,nw,suma:integer;
begin
nk:=strtoint(edit1.text);
suma:=0;
for nw := 0 to stringgrid1.Colcount-1 do
suma:=suma+strtoint(stringgrid1.cells[nk,nw]);
panel1.caption:='suma elementów w kolumnie '+edit1.text+' wynosi '+inttostr(suma)
end;

procedure TForm7.FormCreate(Sender: TObject);
var i,j:integer;
begin
randomize;
for i := 0 to stringgrid1.ColCount-1 do
for j := 0 to stringgrid1.RowCount-1 do
stringgrid1.cells[i,j]:=inttostr(random(101));
end;


end.
Powrót do góry
Zobacz profil autora
Asia




Dołączył: 14 Paź 2010
Posty: 92
Przeczytał: 0 tematów

Skąd: Grudziądz

PostWysłany: Pią 19:58, 28 Paź 2011    Temat postu:

unit U1710;

interface

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

type
TForm7 = class(TForm)
StringGrid1: TStringGrid;
Edit1: TEdit;
Button1: TButton;
Panel1: TPanel;
Button2: TButton;
Button3: TButton;
procedure FormCreate(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form7: TForm7;

implementation

{$R *.dfm}

procedure TForm7.Button1Click(Sender: TObject);
var nk,nw,suma:integer;

begin

nw:=strtoint(edit1.text);
suma:=0;
for nk := 0 to stringgrid1.Colcount-1 do
suma:=suma+strtoint(stringgrid1.cells[nk,nw]);
panel1.caption:='suma elementów w wierszu '+edit1.text+' wynosi '+inttostr(suma)

end;

procedure TForm7.Button2Click(Sender: TObject);
var nk,nw,suma:integer;
begin
nk:=strtoint(edit1.text);
suma:=0;
for nw := 0 to stringgrid1.Colcount-1 do
suma:=suma+strtoint(stringgrid1.cells[nk,nw]);
panel1.caption:='suma elementów w kolumnie '+edit1.text+' wynosi '+inttostr(suma)
end;

procedure TForm7.Button3Click(Sender: TObject);
var nk,nw,max,x:smallint;
begin

nw:=strtoint(edit1.Text);
max:=strtoint(stringgrid1.Cells[0,nw]);
for nk := 1 to stringgrid1.colCount - 1 do
begin
x:=strtoint(stringgrid1.Cells[nk,nw]);
if x>max then max:=x;
end;
panel1.caption:='największy element w wierszu '+edit1.Text+' równa się '+inttostr(max)
end;

procedure TForm7.FormCreate(Sender: TObject);
var i,j:integer;
begin
randomize;
for i := 0 to stringgrid1.ColCount-1 do
for j := 0 to stringgrid1.RowCount-1 do
stringgrid1.cells[i,j]:=inttostr(random(101));
end;


end.
Powrót do góry
Zobacz profil autora
czarny




Dołączył: 22 Paź 2010
Posty: 25
Przeczytał: 0 tematów


PostWysłany: Sob 14:08, 29 Paź 2011    Temat postu:

Asia! ;D a po co to?
Powrót do góry
Zobacz profil autora
Asia




Dołączył: 14 Paź 2010
Posty: 92
Przeczytał: 0 tematów

Skąd: Grudziądz

PostWysłany: Pon 18:40, 14 Lis 2011    Temat postu:

do pisania sprawozdań - niektórzy muszą ;/
Powrót do góry
Zobacz profil autora
Wyświetl posty z ostatnich:   
Napisz nowy temat   Odpowiedz do tematu    Forum www.til2010.fora.pl Strona Główna -> II rok 2011/2012 / Semestr III / INFORMATYKA Wszystkie czasy w strefie CET (Europa)
Strona 1 z 1

 
Skocz do:  
Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach


fora.pl - załóż własne forum dyskusyjne za darmo
Powered by phpBB © 2001, 2005 phpBB Group

Theme xand created by spleen & Programosy.
Regulamin