Ummmmmmm.... ¿esto tiene trampa?
Si lo he entendido bien el código sería este:
Código Delphi
[-]
procedure TForm1.Button1Click(Sender: TObject);
var
n: SmallInt;
m: Currency;
begin
for N:=1 to 100 do begin
if (N mod 3= 0) and (N mod 5=0) then begin
ListBox1.Items.Add('FizzBuzz');
end else if (N mod 3= 0) then begin
ListBox1.Items.Add('Fizz');
end else if (N mod 5= 0) then begin
ListBox1.Items.Add('Buzz');
end else begin
ListBox1.Items.Add(IntToStr(N));
end;
end;
end;
el resultado sería este:
y el tiempo ha sido dos minutillos y pico. ¿Es mucho?