unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 =
class(TForm)
GroupBox1: TGroupBox;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Edit4: TEdit;
Button1: TButton;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
procedure Button1Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var zins, kapital, endbetrag: Real;
i, jahre: Integer;
begin
zins:=StrToFloat(Edit2.Text);
jahre:=StrToInt(Edit3.Text);
kapital:=StrToFloat(Edit1.Text);
i:=0;
for i:= 1
to jahre
do
begin endbetrag:= kapital*(zins/1000)+kapital;
Edit4.Text:=FloatToStr(Endbetrag);
end;
end;