All pastes #276871 Raw Edit

Stuff

public text v1 · immutable
·published 2006-12-12 19:34 UTC
rendered paste body
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Buttons, StdCtrls;

type
  TForm1 = class(TForm)
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    Editanfang: TEdit;
    Editdauer: TEdit;
    Editzinssatz: TEdit;
    Editendkapital: TEdit;
    Button1: TButton;
    BitBtn1: TBitBtn;
    procedure Button1Click(Sender: TObject);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var kapital,zinssatz,zinsen,endkapital: double;
    jahre,anlagedauer: integer;
begin
kapital     := Strtofloat(Editanfang.text);
anlagedauer := Strtoint(Editdauer.text);
zinssatz    := Strtofloat (Editzinssatz.text);

jahre := 0;
repeat
jahre := jahre+1;
zinsen := kapital*zinssatz/100;
endkapital := zinsen+kapital;
until jahre = anlagedauer;



Editendkapital.text := Floattostr(endkapital);

end;

end.