Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (int j=0;j<n;j++)
- {
- if (j!==i)
- {
- if (a[i][j]<0) a[i][j]=-a[i][j];
- sum1+=a[i][j];
- }
- }
- for (int i=0;i<n;j++)
- {
- if (i!==j)
- {
- if (a[i][j]<0) {a[i][j]=-a[i][j];}
- sum2+=a[i][j];
- }
- }
- }
- if (sum2<sum1) {min=sum1;}
- return min;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement