pascalabcnet/InstallerSamples/WhatsNew/3_11_1/SetRandomSeed.pas
Mikhalkovich Stanislav 18709a5cb8 Примеры улучшил добавил
Вернул GitIgnoreTester
2026-02-03 13:48:56 +03:00

17 lines
470 B
ObjectPascal
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// 3.11.1. SetRandomSeed - синоним Randomize с более понятным названием
begin
loop 10 do
Print(Random(100));
Println;
Println;
SetRandomSeed(122);
loop 10 do
Print(Random(100));
Println;
// Вторая последовательность с тем же самым seed совпадает с первой. Нужно для тестирования
SetRandomSeed(122);
loop 10 do
Print(Random(100));
end.