Einzelnen Beitrag anzeigen

ScrollbarKopf

Registriert seit: 17. Okt 2007
154 Beiträge
 
#1

Taschenrechner bitte bracuhe hilfe?!

  Alt 13. Nov 2007, 18:49
OK mein taschnerechner kann alle 4 grundrechenarten und quadrieren möchte jetzt aber noch das er wurzel ziehen kann und dies formel mir ausrechnet mit beliebigen zahlen x = p/2 + - Wurzel von (p/4 + - q*c);
hab bisher dass hier unit Unit1;

interface

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

type
TForm1 = class(TForm)
Addieren: TButton;
Zahl1: TEdit;
Zahl2: TEdit;
Ergebniss: TLabel;
Zahl3: TEdit;
Zahl4: TEdit;
Subtrahieren: TButton;
Ergebniss2: TLabel;
Zahl5: TEdit;
Zahl6: TEdit;
Multiplizieren: TButton;
Ergebniss3: TLabel;
Zahl7: TEdit;
Zahl8: TEdit;
Dividieren: TButton;
Ergebniss4: TLabel;
Zahl9: TEdit;
Zahl10: TEdit;
Quadrieren: TButton;
Ergebniss5: TLabel;
procedure AddierenClick(Sender: TObject);
procedure SubtrahierenClick(Sender: TObject);
procedure MultiplizierenClick(Sender: TObject);
procedure DividierenClick(Sender: TObject);
procedure QuadrierenClick(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.AddierenClick(Sender: TObject);
var
ZahlA , ZahlB , Ergebnis : double;
begin
ZahlA:= strtofloat(Zahl1.Text);
ZahlB:= strtofloat(Zahl2.Text);
Ergebnis:= ZahlA+ZahlB;
Ergebniss.caption:= floattostr (Ergebnis);

end;

procedure TForm1.DividierenClick(Sender: TObject);
var
ZahlA , ZahlB , Ergebnis : double;
begin
ZahlA:= strtofloat (Zahl7.Text);
ZahlB:= strtofloat (Zahl8.Text);
Ergebnis:= ZahlA / ZahlB;
Ergebniss4.Caption:= floattostr (Ergebnis);
end;


procedure TForm1.MultiplizierenClick(Sender: TObject);
var
ZahlA , ZahlB , Ergebnis : double;
begin
ZahlA:= strtofloat(Zahl5.Text);
ZahlB:= strtofloat(Zahl6.Text);
Ergebnis:= ZahlA*ZahlB;
Ergebniss3.caption:= floattostr (Ergebnis);

end;

procedure TForm1.QuadrierenClick(Sender: TObject);
var
ZahlA , ZahlB , Ergebnis : double;
begin
ZahlA:= strtofloat(Zahl9.Text);
Ergebnis:= ZahlA*ZahlA;
Ergebniss5.caption:= floattostr (Ergebnis);
end;

procedure TForm1.SubtrahierenClick(Sender: TObject);
var
ZahlA , ZahlB , Ergebnis : double;
begin
ZahlA:= strtofloat(Zahl3.Text);
ZahlB:= strtofloat(Zahl4.Text);
Ergebnis:= ZahlA-ZahlB;
Ergebniss2.caption:= floattostr (Ergebnis);
end;

end.
Danke für die Antworten im voraus !
  Mit Zitat antworten Zitat