Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int amdau(int a[][SIZE],int m,int n)
- {
- for(int i=0;i<m;i++)
- {
- for(int j=0;j<n;j++)
- {
- if(a[i][j]<0)
- return a[i][j];
- }
- }
- return 0;
- }
- int ammax(int a[][SIZE],int m,int n)
- {
- int max=amdau(a,m,n);
- if(max==0)
- {
- return 0;
- }
- else
- {
- for(int i=0;i<m;i++)
- {
- for(int j=0;j<n;j++)
- {
- if(((a[i][j])<0)&&(a[i][j]>max))
- {
- max=a[i][j];
- }
- }
- }
- }
- return max;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement