uses crt; var n,i: integer; a: array[1..1000] of integer; beginread(n); for i: =1 to n do read(a[i]); for i: =1 to n do beginif a[i]< 0 then a[i]: =abs(a[i]); for i: =1 to n do write(a[i],' '); end.
Ответ дал: Гость
имитационные модели оперируют разыгрыванием случайной величины! если детерминированная модель слишком сложна или вообще не возможна, то на приходит имитационная модель!
begin for a : = 1000 to 9999 do begin c1 : = a div 1000; c2 : = (a div 100) mod 10; c3 : = (a div 10) mod 10; c4 : = a mod 10; if (c1 < > c2) and (c1 < > c3) and (c1 < > c4) and (c2 < > c3) and (c2 < > c4) and (c3 < > c4) then writeln(a); end; end.
Популярные вопросы