Find out the row in which total number of positive elements is bigger | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Find out the row in which total number of positive elements is bigger

N×M First line contains N and M(1<=N, M <=100) Then N lines that contains exactly M numbers each are inputed https://code.sololearn.com/cYHq9Q9PvIXY/?ref=app

27th Oct 2021, 11:32 AM
Le.7
5 Answers
+ 1
Input 2 3 1 -1 3 2 2 2 Output 2
27th Oct 2021, 11:33 AM
Le.7
+ 1
I tested the code with your input example and it outputs 2 as expected. Can you give me another input example that isn't working out as it should? I need it for testing ...
27th Oct 2021, 12:52 PM
Ipang
+ 1
What are variable <ind> and <cnt>?
27th Oct 2021, 1:49 PM
Ipang
0
Output: Output have to contain the index of the row in which total number of positive elements is bigger. If in each row we are equal number of positives output "Numbers are equal". N.B. It's guaranty that only one row at once will have more positive element that others.
27th Oct 2021, 11:32 AM
Le.7
0
3 4 1 1 -3 1 -4 2 2 1 1 -2 2 1 Output Numbers are equal
27th Oct 2021, 1:27 PM
Le.7