Цитата:
Сообщение от Натуличка
да случайными цифрами.
|
Пожалуйста:
Код:
Var A:array[1..100,1..100] of integer;
i,j,n,m,k,t:integer;
b:boolean;
Begin
Randomize;
write('Введите кол-во строк: '); readln(n);
write('Введите кол-во столбцов: '); readln(m);
For i:=1 to n do
Begin
For j:=1 to m do
Begin
A[i,j]:=Random(30)-15;
write(A[i,j]:5);
End;
writeln;
End;
j:=0;
b:=true;
While (j<m)and(b) do
Begin
inc(j);
k:=0;t:=0;
For i:=1 to n do
Begin
if A[i,j]>0 then inc(k);
if A[i,j]<0 then inc(t);
End;
if k=t then b:=false;
End;
if not b then writeln('Yes')
else writeln('No');
readln;
End.