Autor Beitrag
Tabakbrummel
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 124

win 7
Turbo Delphi, VS 20010 Express
BeitragVerfasst: Mi 28.06.06 14:33 
Hallo Delphianer

K = DBEdit1
L = Edit1
G = Edit2

K * L³ = G
100

Und nun zu mein Problem. Wie bekomme ich es mit der Formel in Delphi hin?

_________________
MfG
Tabakbrummel
TmpDir
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 53
Erhaltene Danke: 3

Win7HP Win8.1 Deb/Ubuntu
C# [Delphi 6 Pro, Delphi 2005 PE, TurboDelphi PE]
BeitragVerfasst: Mi 28.06.06 14:46 
Die Funktionen

"power(x,y)" ist für x^3

"inttostr" für edit.text zu Integer-Zahl

und "strtoint" für die Umwandlung von Integer zu Text.

mfg

_________________
repeat :autsch: until :think:
Tabakbrummel Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 124

win 7
Turbo Delphi, VS 20010 Express
BeitragVerfasst: Mi 28.06.06 14:56 
Hallo TmpDir

Ich komme damit nicht klar, könntes du mir mal eventuel ein Codebeispiel senden.

_________________
MfG
Tabakbrummel
TmpDir
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 53
Erhaltene Danke: 3

Win7HP Win8.1 Deb/Ubuntu
C# [Delphi 6 Pro, Delphi 2005 PE, TurboDelphi PE]
BeitragVerfasst: Mi 28.06.06 15:18 
Ungefähr so....

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
var
  k,l,g : Float;  { Beispiel mit Fließkomma Zahlen }
begin
  K = StrToFloat(DBEdit1.text); 
  L = StrToFloat(Edit1.text); 

  G :=  K * power(L,3) / 100;
  
  Edit2.text := FloatToStr(G);
end;

_________________
repeat :autsch: until :think:
crowley
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 406

Win XP, Win Vista, Mandriva, Ubuntu
Delphi 4-8, Delphi 2006, Delphi 2007
BeitragVerfasst: Mi 28.06.06 15:20 
er hat dir doch schon die einzelnen elemente des codes gegeben *seufz*

daraus musst du dir eigentlich nur noch dein "ergebnis" zusammenstellen

ausblenden Delphi-Quelltext
1:
  Edit2.Text := FloatToStr( StrToInt(DBEdit1.Text) * Power(StrToInt(Edit1.Text), 3) / 100);					
Tabakbrummel Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 124

win 7
Turbo Delphi, VS 20010 Express
BeitragVerfasst: Mi 28.06.06 16:15 
Hallo

Vielen dank für eure Antworten.

_________________
MfG
Tabakbrummel