Hola Caral
Sabes que utilize Numeros Decimales, Con variables Real y utilize StrToFloat Pero Igual Me Aparece Error Puedes Revisarlo ???
Código Delphi
[-]
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Edit1: TEdit;
Edit2: TEdit;
Button1: TButton;
Button2: TButton;
Label4: TLabel;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
public
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
N1,N2,Total:Real;
begin
N1:=StrToFloat(Edit1.text);
N2:=StrToFloat(Edit2.Text);
Total:=N1+N2;
Label4.Caption:=FloatToStr(Total);end;
procedure TForm1.Button2Click(Sender: TObject);
begin
Close;
end;
end.