Var ar:array of array of integer; n1,k,i,n2,j:integer; b:boolean; begin; readln(n1); readln(n2); inc(n1); inc(n2); k:=1; setlength(ar,n1+1); while k<>n1 do begin; setlength(ar[k],n2+1); inc(k); end; b:=false; k:=0; i:=1; j:=1; writeln('Matrix:'); while i<>n1 do begin; writeln; while j<>n2 do begin; ar[i,j]:=random(100)-50; write(ar[i,j]:4); inc(j); end; j:=1; inc(i); end; i:=1; j:=1; while i<>n1 do begin; while j<>n2 do begin; if ar[i,j]<0 then b:=true; inc(j); end; if b=false then begin; writeln; writeln(i); exit; end; b:=false; inc(i); j:=1; end; writeln; writeln('Все'); end.
n1,k,i,n2,j:integer;
b:boolean;
begin;
readln(n1);
readln(n2);
inc(n1);
inc(n2);
k:=1;
setlength(ar,n1+1);
while k<>n1 do
begin;
setlength(ar[k],n2+1);
inc(k);
end;
b:=false;
k:=0;
i:=1;
j:=1;
writeln('Matrix:');
while i<>n1 do
begin;
writeln;
while j<>n2 do
begin;
ar[i,j]:=random(100)-50;
write(ar[i,j]:4);
inc(j);
end;
j:=1;
inc(i);
end;
i:=1;
j:=1;
while i<>n1 do
begin;
while j<>n2 do
begin;
if ar[i,j]<0 then b:=true;
inc(j);
end;
if b=false then
begin;
writeln;
writeln(i);
exit;
end;
b:=false;
inc(i);
j:=1;
end;
writeln;
writeln('Все');
end.
using namespace std;
int main() {
int a, b, c, d;
cout << "a = ";
cin >> a;
cout << "b = ";
cin >> b;
cout << "c = ";
cin >> c;
cout << "d = ";
cin >> d;
if (a <= d && b <= d) {
cout << "Yes, a - b";
} else if (a <= d && c <= d) {
cout << "Yes, a - c";
} else if (b <= d && c <= d) {
cout << "Yes, b - c";
} else {
cout << "No";
}
return 0;
}