.


:




:

































 

 

 

 


If RadioButton1.Checked then




20

2.23 (99) ;

 

Button1 caption Oneclick
StringGrid cells  
Edit1 text  

 

procedure TForm1.Button1Click(Sender: TObject);

var s:real;

i,j:integer;

a:array [1..9,1..9] of integer;

Begin

s:=0;

for i:=1 to 9 do

for j:=1 to 9 do

Begin

a[i,j]:=1+random(100);

stringgrid1.cells[i,j]:=inttostr(a[i,j]);

if a[i,j] mod 4=0 then

s:=s+a[i,j];

End;

edit1.text:=floattostr(s);

End;

End.

 

 

21

()

2.23 0.5 .

 

 

Label1 Tlabel Caption Text
Label2 Tlabel Caption Text
Label3 Tlabel Caption Text
Button1 Tbutton Caption OneClick
Button2 Tbutton Caption OneClick
Timer1 TTimer Enabled Timer

 

 

 

Begin

Label2.Visible:= not Label2.Visible;

If not Label2.Visible

Then exit;

if s=59 then

Begin

Inc(m);

Label1.Caption:=IntToStr(m);

s:=0;

End

Else

Inc(s);

if s<10 then

Label3.Caption:='0'+ IntToStr(s)

Else

Label3.Caption:=IntToStr(s);

End;

procedure TForm1.Button1Click(Sender: TObject);

Begin

If Timer1.Enabled

Then

Begin

Timer1.Enabled:= False;

Button1.Caption:='';

Button2.Enabled:=True;

End

Else

Begin

Timer1.Enabled:= True;

Button1.Caption:='';

Button2.Enabled:=False;

End;

procedure TForm1.Button2Click(Sender: TObject);

Begin

s:=0;

m:=0;

Label1.Caption:='00';

Label3.Caption:='00';

End;

End.

 

 

 

 


22

2.23 .

 

Button1 TButton Caption OneClick
Label1-2 TLabel Caption Text
Edit1 Text  
Edit2 Text  
StringGrid1 TStringGrid cells  

 

 

 

 

 

 

 


23

2.23 , .

 

 

Edit1 TEdit Text  
Edit2 TEdit Text  
Edit3 TEdit Text  
Edit4 TEdit Text  
Edit5 TEdit Text  
Label1-Label6 Tlabel caption Text
Button1 TButton caption OneClick
RadioButton1 TRadioButton ItemIndex OneClick
RadioButton2 TRadioButton ItemIndex OneClick
RadioButton3 TRadioButton ItemIndex OneClick

 

procedure TForm1.Button1Click(Sender: TObject);

var a,b,c,d:integer;

Begin

a:=StrToInt(Edit1.Text);

b:=StrToInt(Edit2.Text);

c:=StrToInt(Edit3.Text);

d:=StrToInt(Edit4.Text);

If RadioButton1.Checked then

edit5.text:=Inttostr(a+b);





:


: 2016-03-27; !; : 459 |


:

:

,
==> ...

1723 - | 1490 -


© 2015-2024 lektsii.org - -

: 0.024 .