![]() |
AW: Arrays addieren
Zitat:
|
AW: Arrays addieren
würde das so gehen wenn ich die arrays addieren will
Delphi-Quellcode:
for i:=1 to 3 do
for j:=i+1 to 4 do zahl1 := StrToInt(a[i]) + StrToInt(a[j]); zahl2 := StrToInt(b[i]) + StrToInt(b[j]); differenz := zahl2 - zahl1; Edit2.text := IntToStr(differenz); |
AW: Arrays addieren
Hast Du Delphi?
|
AW: Arrays addieren
Zitat:
|
AW: Arrays addieren
Zitat:
|
AW: Arrays addieren
Kleine Denksportaufgabe für den TE:
Delphi-Quellcode:
Preisfrage: woran liegt das, dass die erste Zahl 1234 und die zweite 10 ist?
procedure TFormBla.ButtonWuppdiClick(Sender: TObject);
const Chars: array[1..4] of Char = ('1', '2', '3', '4'); var Zahl: integer; begin Zahl := StrToInt(Chars[1] + Chars[2] + Chars[3] + Chars[4]); ShowMessage(IntToStr(Zahl)); Zahl := StrToInt(Chars[1]) + StrToInt(Chars[2]) + StrToInt(Chars[3]) + StrToInt(Chars[4]); ShowMessage(IntToStr(Zahl)); end; |
Alle Zeitangaben in WEZ +1. Es ist jetzt 01:46 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz