0
Given three integer matrices A(m*n),B(m*n) and C(m*n) . Print the one with more zero elements. beside code
https://www.sololearn.com/compiler-playground/cf961HD6PeXA So for sure, this is not a complete code, I am missing a piece of code responsible for finding zero elements. I need the output of a column of three, the one that will show where there are more zero elements. For example, I take an input that I have 2x2 matrices (any, but the same size), after which I enter any numbers (as I understand it) and I should have it show a column in which there are more zero elements
12 Answers
+ 3
Create a 3x2 array for storing zero value counter <zero_counter>
{ { index, count }, { index, count }, { index, count } }
index - index of column in matrix
count - count of zero in column[index]
You can then compare the array elements to find which column of which matrix has the most zero value ...
+ 3
A B C
1 2 0 9 99 0
3 4 0 7 42 5
For above matrices, is it matrix B with most zero value?
+ 1
Why it says product of matrices at the bottom? what are you into actually? calculating product or find a column with more zero elements?
+ 1
Thank u
+ 1
I have to go now, maybe in 2 hours, or when I have the time ...
0
I will need to calculate further, and at the moment I have to find a matrix where there are more than the number of zero elements and so that the one that fits this criterion is displayed on the screen.
0
Yes
0
can you offer an example, in truth, this is the first time I encounter this
0
Okey
0
Hii
0
Bro