Thema: Delphi Hoch Programm

Einzelnen Beitrag anzeigen

Bjoerk

Registriert seit: 28. Feb 2011
Ort: Mannheim
1.384 Beiträge
 
Delphi 10.4 Sydney
 
#6

AW: Hoch Programm

  Alt 24. Nov 2011, 00:49
Ist mindestens der dritte Thread dieser Art. Boxer, mach' dir div und mod halt mal klar.
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var
  X, Y, Z: Integer;
begin
  for X:= 2 to 4 do
    for Y:= 2 to 4 do
    begin
      ShowMessage (IntToStr(X)+' div '+IntToStr(Y)+' = ');
      ShowMessage (IntToStr(X)+' div '+IntToStr(Y)+' = '+IntToStr(X div Y));
    end;
  for X:= 2 to 4 do
    for Y:= 2 to 4 do
    begin
      ShowMessage (IntToStr(X)+' mod '+IntToStr(Y)+' = ');
      ShowMessage (IntToStr(X)+' mod '+IntToStr(Y)+' = '+IntToStr(X mod Y));
    end;
  for X:= 2 to 4 do
    for Y:= 1 to 2 do
      for Z:= 1 to 2 do
      begin
        ShowMessage (IntToStr(X)+' div '+IntToStr(Y)+' mod '+IntToStr(Z)+' = ');
        ShowMessage (IntToStr(X)+' div '+IntToStr(Y)+' mod '+IntToStr(Z)+' = '+IntToStr(X div Y mod Z));
      end;
end;
  Mit Zitat antworten Zitat