Matrix and vector comparison C / C ++ [closed]

1

I need to compare an op vector entered by the user with the first 10 columns of each row of a 12x12 array.

for(k=0; k<10; k++){
for(i=0; i<12; i++){
    for(j=0; j<10; j++){
        if(op[k]==d[i][j]){
            if(i==1)
                flagd1++;
            if(i==2)
                flagd2++;
            if(i==3)
                flagd3++;
            if(i==4)
                flagd4++;
            if(i==5)
                flagd5++;
            if(i==6)
                flagd6++;
            if(i==7)
                flagd7++;
            if(i==8)
                flagd8++;
            if(i==9)
                flagd9++;
            if(i==10)
                flagd10++;
            if(i==11)
                flagd11++;
            if(i==12)
                flagd12++;
        }
    }
}

}

    
asked by anonymous 13.12.2017 / 06:44

0 answers