#include
#include
void main()
{
int a[20][20],m,n,count=0,c[20][20],max=0,max1=0;
clrscr();
cout<<"enter rows and columns of matrix:\n"; cin>>m>>n;
for(int i=0;i
}
}
for(i=0;i
count=0;
for(int j=0;j
if(a[i][j]<0)
{
c[i][j]=++count;
}
if(max
max=count;
max1=i+1;
}
}
cout<<"row containing no of negative terms"< }
cout<<"row containing maximum no of negative elements:"<
}
No comments:
Post a Comment