10
: . , .
:. , , , Delphi. , , ; .
: , .
- , .
:
~ (a*a*a+2*x)/(4*a-x);. ~ ((a+1)*(a+1)-2)/(4*(a-x)).
Delphi:
Delphi | , . | Delphi | , . | |
Abs(x) | | x | . | Trun(x) | ֳ | |
Sqrt(x) | √x . | Int(x) | ||
Sqr(x) | x2 | Random | Î(0;1) | |
Exp(x) | Random(n) | Î[0;n] |
IntToStr (k) | k | |
FloatToStr (n) | n | |
FloatToStrF(n, fffixed, k,m) | n ; k , m . | |
StrToInt (s) | ֳ s | |
StrToFloat (s) | ij s |
.
: < >: = < >;
, , . , , .
:
Label2.captin:= !; Label2;
S:=Edit1.text; Edit1 S.
Image3.Visible:=true; Image3, .
Label2.captin:= Edit1.text+, !; , Edit1 Label2.
Label , .
Edit , .
Button . , .
ճ
1. , . ( 7 ).
Delphi.
2. ³ .
: dit dit, Label +, Button - , .
|
|
. ,
3. .
Delphi . , Button. .
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
lbl1: TLabel;
btn1: TButton;
btn2: TButton;
procedure btn1Click(Sender: TObject);
procedure btn2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
Implementation
{$R *.dfm}
procedure TForm1.btn1Click(Sender: TObject);
Var
a,b,c:Integer;
begin
a:=strtoint(Edit1.Text);
b:=strtoint(Edit2.Text);
c:=a+b;
Edit3.Text:=inttostr(c);
end;
procedure TForm1.btn2Click(Sender: TObject);
begin
Close;
end;
end.
4. ( ). , .
5. D:\MyProgram 10 ( File Save Project As).
6. , 䳿.
2. , . . ϳ , . ( 7 ).
: a, b, c ( ) . S .
: : .
Delphi :
1. .
( Caption, ). , . , , .
2. 䳿 .
䳿, 俳 Button1Click. 䳿.
3. 䳿.
begin , , :
var a,b,c,p,s:real; f:string;
a,b,c,p,s (real),
f (string).
̳ begin end , .
, - . , , . . .
|
|
ֳ , a, b, c (string) (float).
. .
ֳ , , .
: . , , .
S (float) (string) label5.
4. .
5. :
( File SaveProject As). Delphi , . .
(*.), Proiect BuildNameProject.
, : File New Application. Delphi , .
.
1. 䳿?
2. ?
3. ?
4. ?
5. ?