Const N = 13; Var A:array[1..N] of integer; i,x:integer; Begin Write('x = '); ReadLn(x); Write('Исходный массив: '); For i:= 1 to N do Begin A[i]:=random(N)-N div 2; Write(A[i],' '); End; WriteLn; Write('Искомые элементы: '); For i:= 1 to N do if (-1 <= A[i] mod x)and(A[i] mod x <= 0) then Write(A[i],' ') End.
N = 13;
Var
A:array[1..N] of integer;
i,x:integer;
Begin
Write('x = ');
ReadLn(x);
Write('Исходный массив: ');
For i:= 1 to N do
Begin
A[i]:=random(N)-N div 2;
Write(A[i],' ');
End;
WriteLn;
Write('Искомые элементы: ');
For i:= 1 to N do
if (-1 <= A[i] mod x)and(A[i] mod x <= 0) then Write(A[i],' ')
End.