Today I learned about pseudo random number generator driven FizzBuzz (https://stackoverflow.com/q/20957693) and I couldn't stop myself from porting it to Delphi ...
program FizzBuzzRandom;
{$APPTYPE CONSOLE}
{$R *.res}
uses
System.SysUtils;
procedure FizzBuzz(upTo: integer);
var
i: integer;
begin
for i := 1 to upTodo begin
if (i mod 15) = 1 then
RandSeed := 1973472511;
Write(TArray<string>.Create(i.ToString, 'Fizz', 'Buzz', 'FizzBuzz')[Random(521) mod 4], ' ');
end;
end;
begin
FizzBuzz(100);
Readln;
end.