Курсовая работа: Применение датчиков случайных чисел для имитации реальных условий
readln (c);
writeln ('vvedite m>(x0 and a and c):');
readln (m);
if (x0>=0) and (a>=0) and (c>=0) then
if (m>x0) and (m>a) and (m>c) then
for i:=0 to n do x[i+1]:=(a*x[i]+c) mod m;
writeln ('chisla: ');
for i:=1 to n do write(x[i], ' ');
writeln;
end.
2. Program g2;
var I, l: integer;
begin
for I:=l to 10 do
write(random(200):4)
end.
3. program number(input, output);
var a, b, n, s, i : integer;
begin
writeln ('poluchenie sluchainih chisel iz intervala [a,b]');
write ('vvedite a');
readln (a);
write ('vvedite b');
readln (b);
writeln ('vvedite n');
readln (n);
for i:=1 to n do
begin
s:=trunc(random(b-a)+a);