: . (. 1)
1
Form1 | Color | clWhite |
Caption | ||
Bordericons | [] | |
Font.size | ||
Font.name | Monotype Corsiva | |
Image1 | Stretch | True |
Picture | \...\001.ipg | |
Label1 | Caption | 2-1 |
Wordwrap | True | |
Button1 | Caption | |
Button2 | Caption |
Button1 | uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, jpeg, ExtCtrls, Menus, StdCtrls,unit2; procedure TForm1.Button1Click(Sender: TObject); begin form1.Hide;{ form1} form2.Show;{ form2} end; |
Button2 | procedure TForm1.Button2Click(Sender: TObject); begin close end; |
(. 2)
2
Form2 | Caption | |
Bordericons | [biSystemMenu] | |
Font.size | ||
Image1 | Stretch | True |
Picture | \...\002.ipg | |
MainMenu | Caption |
uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, Menus, jpeg, ExtCtrls,unit3,unit4,unit5,unit6,unit7,unit8; | |
N11 | procedure TForm2.N11Click(Sender: TObject); begin form2.Hide; form3.Show; end; |
N21 | procedure TForm2.N21Click(Sender: TObject); begin form2.Hide; form4.Show; end; |
N31 | procedure TForm2.N31Click(Sender: TObject); begin form2.Hide; form5.Show; end; |
N51 | procedure TForm2.N51Click(Sender: TObject); begin form2.Hide; form6.show; end; |
N41 | procedure TForm2.N41Click(Sender: TObject); begin form2.Hide; form7.show; end; |
N61 | procedure TForm2.N61Click(Sender: TObject); begin form2.Hide; form8.show; end; |
: . . (. 3)
3
Form3 | Caption | |
Bordericons | [] | |
Font.size | ||
Font.name | Times New Roman | |
Image1 | Stretch | True |
Picture | \...\002.ipg | |
Label1 | Caption | . . |
Wordwrap | True | |
Label2 | Caption | |
Label3 | Caption | a= |
Label4 | Caption | b= |
Edit1 | Text | |
Edit2 | Text | |
Button1 | Caption | |
Button2 | Caption | |
Enabled | false |
|
|
Edit1 | procedure TForm3.Edit1KeyPress(Sender: TObject; var Key: Char); begin if not (key in['0'..'9', #13,#8]) then begin ShowMessage( '); key:=#0; end; end; |
Edit2 | procedure TForm3.Edit2KeyPress(Sender: TObject; var Key: Char); begin if not (key in['0'..'9', #13,#8]) then begin ShowMessage( '); key:=#0; end; end; |
Button1 | procedure TForm3.Button1Click(Sender: TObject); var a,b:integer; p:real; begin If (edit1.Text='') or (edit2.Text='') then ShowMessage( ,'+#13+' "" ') Else begin a:=StrToInt(Edit1.Text); b:=StrToInt(Edit2.Text); p:= Sqr(a)+sqr(b)+sqrt(sqr(a)+sqr(b)); Showmessage(''+#13+floatTostrf(p,fffixed,4,2)); button2.Enabled:=true; edit1.Text:=''; edit2.Text:=''; end; end; |
Button2 | procedure TForm3.Button2Click(Sender: TObject); begin form3.hide; form2.show; end; |
: . , . (. 4)
4
Form4 | Caption | |
Bordericons | [] | |
Font.size | ||
Font.name | Times New Roman | |
Image1 | Stretch | True |
Picture | \...\002.ipg | |
Label1 | Caption | . , |
Wordwrap | True | |
Label2 | Caption | |
Edit1 | Text | |
Button1 | Caption | |
Button2 | Caption | |
Enabled | false |
Form4 | procedure TForm4.FormActivate(Sender: TObject); begin ShowMessage(' .'+#13+' , '); end; |
Edit1 | procedure TForm4.Edit1KeyPress(Sender: TObject; var Key: Char); begin if not (key in['0'..'9', #13,#8]) then begin ShowMessage( '); key:=#0; end; end; |
Button1 | procedure TForm4.Button1Click(Sender: TObject); var t,c,d,e:byte; a,b:integer; begin if length(Edit1.Text)<>4 then BEGIN Showmessage( .'+#13+ '); EDIT1.Text:= ' '; edit1.SetFocus; end else begin a:=strtoint(Edit1.Text); t:=a div 1000; c:=a div 100 mod 10; d:=a div 10 mod 10; e:= a mod 10; b:=e*1000+d*100+c*10+t; label4.Caption:=''+ #13+' '+ intToStr(b); end; button2.Enabled:=true; end; |
Button2 | procedure TForm4.Button2Click(Sender: TObject); begin form4.Hide; form2.show; end; |
: , , . (. 5)
|
|
5
Form5 | Caption | |
Bordericons | [] | |
Font.size | ||
Font.name | Times New Roman | |
Image1 | Stretch | True |
Picture | \...\002.ipg | |
Label1 | Caption | , , . |
Wordwrap | True | |
Label2 | Caption | |
Edit1 | Text | |
Edit2 | Text | |
Edit3 | Text | |
Button1 | Caption | |
Button2 | Caption | |
Enabled | false |
Edit1 | procedure TForm5.Edit1KeyPress(Sender: TObject; var Key: Char); begin if not (key in['0'..'9', #13,#8]) then begin ShowMessage( '); key:=#0; end; end; |
Edit2 | procedure TForm5.Edit2KeyPress(Sender: TObject; var Key: Char); begin if not (key in['0'..'9', #13,#8]) then begin ShowMessage( '); key:=#0; end; end; |
Edit3 | procedure TForm5.Edit3KeyPress(Sender: TObject; var Key: Char); begin if not (key in['0'..'9', #13,#8]) then begin ShowMessage( '); key:=#0; end; end; |
Button1 | procedure TForm5.Button1Click(Sender: TObject); begin label6.Caption:=' : '; if StrToInt(edit1.Text) mod 2=0 then label6.Caption:=label6.Caption+ edit1.Text+' '; if StrToInt(edit2.Text) mod 2=0 then label6.Caption:=label6.Caption+ edit2.Text+' '; if StrToInt(edit3.Text) mod 2=0 then label6.Caption:=label6.Caption+ edit3.Text+' '; button2.Enabled:=true; end; |
Button2 | procedure TForm5.Button2Click(Sender: TObject); begin form5.Hide; form2.show; end; |
: , 50. (. 6)
6
Form7 | Caption | |
Bordericons | [] | |
Font.size | ||
Font.name | times new roman | |
Image1 | Stretch | true |
Picture | \...\002.ipg | |
Label1 | Caption | , 50. |
Button1 | Caption | |
Button2 | Caption | |
Enabled | false |
Button1 | procedure TForm7.Button1Click(Sender: TObject); var i:byte; s:integer; begin s:=0; i:=1; while i<51 do begin s:=s+i; i:=i+2; end; ShowMessage( 50 '+ IntToStr(s)); button2.Enabled:=true; end; |
Button2 | procedure TForm7.Button2Click(Sender: TObject); begin form7.hide; form2.show; end; |
: f1=0, f2=1, fn=fn-1+fn-2. , n . (. )
7
Form6 | Caption | |
Bordericons | [] | |
Font.size | ||
Font.name | times new roman | |
Image1 | Stretch | true |
Picture | \...\002.ipg | |
Label1 | Caption | f1=0, f2=1, fn=fn-1+fn-2. , n . |
Label2 | Caption | |
Edit1 | Text | |
Label3 | Caption | |
Label4 | Caption | |
Button1 | Caption | |
Button2 | Caption | |
Enabled | false |
|
|
Edit1 | procedure TForm6.Edit1KeyPress(Sender: TObject; var Key: Char); begin if not (key in['0'..'9', #13,#8]) then begin ShowMessage( '); key:=#0; end; end; |
Button1 | procedure TForm6.Button1Click(Sender: TObject); var n:integer; i:byte; f:array of integer; begin label4.Caption:=' '; if strtoint(edit1.Text)=0 then begin showMessage(' ); edit1.Text; edit1.SetFocus; end else begin n:=strtoint(edit1.Text); setlength(f,n); f[0]:=0; f[1]:=1; label4.Caption:=intTostr(f[0])+' '+intTostr(f[1])+' '; for i:=2 to n-1 do begin f[i]:=f[i-1]+f[i-2]; label4.Caption:=label4.Caption+intTostr(f[i])+' '; end; end; Button2.Enabled:=true; end; |
Button2 | procedure TForm6.Button2Click(Sender: TObject); begin form6.Hide; form2.show; end; |
: . 30. (. 8)
8
Form8 | Caption | |
Bordericons | [] | |
Font.size | ||
Font.name | times new roman | |
Image1 | Stretch | true |
Picture | \...\002.ipg | |
Label1 | Caption | . 30. |
Label2 | Caption | |
Button1 | Caption | |
Enabled | false | |
Button2 | Caption | |
WordWrap | true | |
Enabled | false | |
Button4 | Caption | |
Enabled | False | |
WordWrap | True | |
Button5 | Caption | |
StringGrid1 | Name | St1 |
FixedRows | ||
FixedCols | ||
RowCount | ||
ColCount |
var Form8: TForm8; a:array of array of integer; i, j, n, m:byte; s:integer; | |
Button1 | procedure TForm8.Button1Click(Sender: TObject); begin n:=strtoint(Inputbox('',' ','3')); m:=strtoint(Inputbox('',' ','3')); st1.ColCount:=m; st1.RowCount:=n; button2.Enabled:=true; button1.Enabled:=false; setlength(a,n,m); end; |
Button2 | procedure TForm8.Button2Click(Sender: TObject); begin st1.Visible:=true; for i:=0 to n-1 do for j:=0 to m-1 do begin a[i,j]:=StrToInt(Inputbox('',' ','6')); st1.Cells[j,i]:=inttostr(a[i,j]); end; button2.Enabled:=false; button4.Enabled:=true; end; |
Button4 | procedure TForm8.Button4Click(Sender: TObject); begin Button2.Enabled:=false; s:=0; for i:=0 to n-1 do for j:=0 to m-1 do if a[i,j]>30 then s:=s+ a[i,j]; label2.Visible:=true; label2.Caption:=' , 30 ' + IntToStr(s); end; |
Button5 | procedure TForm8.Button5Click(Sender: TObject); begin form8.Hide; form2.show; end; |
1. , .. .-2- ., . . .: -, 2007.
2. : . 10-11 . . / . . . .: , 2000.
3. / .. . .: , 2007.
|
|
4. , . . : . . . / . . .-.: , 2012.
5. . [ ]/(http://yourmetod.ru) 04.04.2013