
03.06.2010, 22:32
|
 |
Прохожий
|
|
Регистрация: 22.04.2010
Сообщения: 28
Репутация: 10
|
|
Код:
unit Unit3;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Edit1: TEdit;
Edit2: TEdit;
Label1: TLabel;
Button1: TButton;
Button2: TButton;
Label2: TLabel;
Label3: TLabel;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
a : real ;
b : real ;
x : real ;
begin
a := StrToint(Edit1.Text); b := StrToFloat(Edit2.Text);
x :=
Label1.Caption := '' + Edit1.Text
+ '' + Edit2.Text + ''
+ FloatToStrF(x,ffFixed,4,2)
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
Form1.Close ;
end;
end.
можите прям сюда вставить?
__________________
А мне 13 лет
|