Autor Beitrag
Delphi-Amateur
Hält's aus hier
Beiträge: 3

WIN XP
Delphi Borland6, Pascal
BeitragVerfasst: Mo 13.03.06 14:01 
Hi Leute,
hier ist wieder ein Problem aus der Schule. Wir sollen in Delphi ein Programm schreiben mit de mman Dividieren kann. Es soll bei dem Button 'MOD' dividiert werden und der Rest soll auch angezeigt werden BSP: 14/6 = 2 R2
und bei dem Button 'Div' sollen alle ganzzahligen teiler berechnet werden. BSP= 14/6 = 2
Wie kann ich die buttons programmieren? Danke im vorraus für alle nützlich kommentare =)
MFG Florian
Hux
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 171



BeitragVerfasst: Mo 13.03.06 14:08 
ausblenden Delphi-Quelltext
1:
Label1.Caption:=IntToStr(StrToInt(Edit1.Text) div StrToInt(Edit2.Text))+' R '+IntToStr(StrToInt(Edit1.Text) div StrToInt(Edit2.Text));					

oder wie meinst du es???
Ich hab dein Problem nicht wirklich verstanden... :?:

Moderiert von user profile iconUGrohne: Beiträge zusammengefasst.
Miri
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 657


Delphi 3 Prof., Delphi 2005 PE
BeitragVerfasst: Mo 13.03.06 14:22 
user profile iconHux hat folgendes geschrieben:
ausblenden Delphi-Quelltext
1:
Label1.Caption:=IntToStr(StrToInt(Edit1.Text) div StrToInt(Edit2.Text))+' R '+IntToStr(StrToInt(Edit1.Text) mod StrToInt(Edit2.Text));					



so müsste es richtig sein :)
Hux
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 171



BeitragVerfasst: Mo 13.03.06 14:40 
jo... stimmt, sry...