1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
math, StdCtrls ;
type
TForm1 = class(TForm)
Label1: TLabel;
Label2: TLabel;
procedure FormCreate(Sender: TObject);
private
{ Déclarations privées }
public
{ Déclarations publiques }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.FormCreate(Sender: TObject);
var
f, g, h, res, res2 : real;
begin
f := 2.0;
g := 3.0;
h := 4.0;
f := power(f, f + 1);
res := power(1 + g, g / 12);
res := res - 1;
res2 := (f / h) * (g / 12) + 1;
{interetmensuel.caption:= floattostr((1+g)^(g/12)-1);
primemens.caption:=FloatToStr ((f/h)*(g/12)+1);}
Label1.Caption := FloatToStr(res);
Label2.Caption := FloatToStr(res2);
{ShowMessage('f = ' + FloatToStr(f));
ShowMessage('res = ' + FloatToStr(res));
ShowMessage('res2 = ' + FloatToStr(res2));}
end;
end. |
Partager