unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TForm1 =
class(TForm)
Edit1: TEdit;
Edit2: TEdit;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Button1: TButton;
Button2: TButton;
Button3: TButton;
procedure Button1Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
Menge : Integer ;
Preis : Real ;
Brutto : Real;
Rabattsatz: Real;
Rabatbetrag: Real ;
implementation
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
begin
Menge := StrToInt (Edit1.Text);
Preis := StrToFloat (Edit2.Text);
Brutto := Menge * Preis;
Label3.Caption := '
Brutto-Preis : ' + FloatToStrF (Brutto, ffNumber, 7,2);
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
close;
end;
end.