uses graphabc;
begin
setwindowsize (600,555);
SetPenWidth(2);
rectangle (200,200,400,499);
FloodFill(300,300,clBurlyWood);
rectangle (225,225,275,275);
FloodFill(250,250,clLightCyan);
line (225,250,275,250);
line (250,250,250,275);
rectangle (325,225,375,275);
FloodFill(350,250,clLightCyan);
line (325,250,375,250);
line (350,250,350,275);
rectangle (225,400,275,450);
FloodFill(250,425,clLightCyan);
line (225,425,275,425);
line (250,425,250,450);
rectangle (325,425,375,500);
FloodFill(350,490,clMaroon);
pie (350,425,25,0,180);
FloodFill(350,420,clMaroon);
line (200,200,300,100);
line (300,100,400,200);
FloodFill(300,110,clChocolate);
circle (300,160,20);
FloodFill(300,160,clLightCyan);
line (375,175,375,100);
line (375,100,355,100);
line (355,100,355,155);
FloodFill(370,110,clLightGray);
circle (550,50,30);
FloodFill(525,50,clYellow);
line (535,25,510,0);
line (525,35,470,15);
line (520,50,475,50);
line (525,65,485,90);
line (537,78,505,110);
line (550,80,535,120);
line (565,75,565,120);
line (575,65,595,90);
pie (500,413,30,0,180);
FloodFill(500,400,clRed);
rectangle (495,413,505,500);
FloodFill(500,495,clChocolate);
end.
<code>
#include <iostream>
using namespace std;
int main()
{
int n,m;
cout<<"Размер матрицы:\n";
cout<<"n:";cin>>n;
cout<<"m:";cin>>m;
int **matrix = new int*;
for(int i = 0;i<n;i++){
matrix[i] = new int;
}
for(int j = 0;j<m;j++){
cin>>matrix[i][j];
if(matrix[i][j]<0){
cout<<"Первый отрицательный элемент в строке "<<i<<" - "<<matrix[i][j]<<endl;
break;
else if(j == m-1 && !(matrix[i][j]<0)){
cout<<"В строке "<<i<<" нет отрицательных чисел"<<endl;
return 0;
</code>
uses graphabc;
begin
setwindowsize (600,555);
SetPenWidth(2);
rectangle (200,200,400,499);
FloodFill(300,300,clBurlyWood);
rectangle (225,225,275,275);
FloodFill(250,250,clLightCyan);
line (225,250,275,250);
line (250,250,250,275);
rectangle (325,225,375,275);
FloodFill(350,250,clLightCyan);
line (325,250,375,250);
line (350,250,350,275);
rectangle (225,400,275,450);
FloodFill(250,425,clLightCyan);
line (225,425,275,425);
line (250,425,250,450);
rectangle (325,425,375,500);
FloodFill(350,490,clMaroon);
pie (350,425,25,0,180);
FloodFill(350,420,clMaroon);
line (200,200,300,100);
line (300,100,400,200);
FloodFill(300,110,clChocolate);
circle (300,160,20);
FloodFill(300,160,clLightCyan);
line (375,175,375,100);
line (375,100,355,100);
line (355,100,355,155);
FloodFill(370,110,clLightGray);
circle (550,50,30);
FloodFill(525,50,clYellow);
line (535,25,510,0);
line (525,35,470,15);
line (520,50,475,50);
line (525,65,485,90);
line (537,78,505,110);
line (550,80,535,120);
line (565,75,565,120);
line (575,65,595,90);
pie (500,413,30,0,180);
FloodFill(500,400,clRed);
rectangle (495,413,505,500);
FloodFill(500,495,clChocolate);
end.
<code>
#include <iostream>
using namespace std;
int main()
{
int n,m;
cout<<"Размер матрицы:\n";
cout<<"n:";cin>>n;
cout<<"m:";cin>>m;
int **matrix = new int*;
for(int i = 0;i<n;i++){
matrix[i] = new int;
}
for(int i = 0;i<n;i++){
for(int j = 0;j<m;j++){
cin>>matrix[i][j];
}
}
for(int i = 0;i<n;i++){
for(int j = 0;j<m;j++){
if(matrix[i][j]<0){
cout<<"Первый отрицательный элемент в строке "<<i<<" - "<<matrix[i][j]<<endl;
break;
}
else if(j == m-1 && !(matrix[i][j]<0)){
cout<<"В строке "<<i<<" нет отрицательных чисел"<<endl;
}
}
}
return 0;
}
</code>