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

7th Feb 2023, 12:41 PM
Никита Л
Никита Л - avatar
12 odpowiedzi
+ 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 ...
7th Feb 2023, 1:28 PM
Ipang
+ 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?
7th Feb 2023, 1:09 PM
Ipang
+ 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?
7th Feb 2023, 12:51 PM
Ipang
+ 1
Thank u
7th Feb 2023, 1:30 PM
Никита Л
Никита Л - avatar
+ 1
I have to go now, maybe in 2 hours, or when I have the time ...
7th Feb 2023, 1:40 PM
Ipang
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.
7th Feb 2023, 1:03 PM
Никита Л
Никита Л - avatar
0
Yes
7th Feb 2023, 1:13 PM
Никита Л
Никита Л - avatar
0
can you offer an example, in truth, this is the first time I encounter this
7th Feb 2023, 1:37 PM
Никита Л
Никита Л - avatar
7th Feb 2023, 1:38 PM
Никита Л
Никита Л - avatar
0
Okey
7th Feb 2023, 1:42 PM
Никита Л
Никита Л - avatar
0
Hii
9th Feb 2023, 2:07 AM
Dinesh Moka
Dinesh Moka - avatar
0
Bro
9th Feb 2023, 2:07 AM
Dinesh Moka
Dinesh Moka - avatar