Delphi - Üs Hesaplama Programı Virgullu rakamlarda dahil, rakamların üslerini hesaplayan program.. Ornek= 2³ -> 8
Kod:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Button1: TButton;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
a,b,c:real;
begin
a:=StrToFloat(Edit1.Text);
b:=StrToFloat(Edit2.Text);
C:=Exp(B*Ln(A));
Edit3.Text:=FloatToStr(c);
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
edit1.text:=";
edit2.text:=";
edit3.text:=";
end;
end.