Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int verificaMatrice(int A[][DIMC],int nA, int mA, int *x, int *y )
- {
- int somma=0, esito;
- int sommarighe[DIMR], sommacolonne[DIMC];
- int i, j, k=0;
- for(i=0;i<nA;i++){
- for(j=0;j<mA;j++){
- somma+= A[i][j];
- }
- sommarighe[i]= somma;
- somma=0;
- }
- for(j=0;j<mA;j++){
- for(i=0;i<nA;i++){
- somma+= A[i][j];
- }
- sommacolonne[j]=somma;
- somma=0;
- }
- for(i=0;i<nA;i++){
- while (k<mA){
- if(sommarighe[i]!=sommacolonne[k])
- k++;
- else if(sommarighe[i]==sommacolonne[k]){
- esito=sommarighe[i];
- *x=i;
- *y=k;
- break;
- }
- else
- esito =0;
- }
- }
- return esito;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement