Please help me to solve this prob | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Please help me to solve this prob

for any input it giving same output without checking if condition.plz give input as n=2 m=3 values as -1 10 10 10 2 -1 .output should be 2 according to logic. https://code.sololearn.com/cQUPRv8d2sbS/?ref=app

11th Oct 2018, 9:15 AM
mallasai KUMAR
mallasai KUMAR - avatar
5 Answers
0
I dont understanded. Explain better what your program have to get like input and what it must output
11th Oct 2018, 10:07 AM
KrOW
KrOW - avatar
0
in description i have given detils like input ,output
11th Oct 2018, 10:09 AM
mallasai KUMAR
mallasai KUMAR - avatar
0
mallasai KUMAR Yes but i dont understand... What are n and m? And -1 10 10 10 2 -1? And why your program, in this case, output 2?
11th Oct 2018, 10:12 AM
KrOW
KrOW - avatar
0
array [n][m], n,m are number of rows and columns and the values are given to array .output is 2 because minimum positive value
11th Oct 2018, 10:16 AM
mallasai KUMAR
mallasai KUMAR - avatar
- 1
mallasai KUMAR Then you have to get the minimum positive number from inputs. Sorry, but you cannot do in more simple manner like this? 1) read m and n 2) read m * n ints and for any int ... 3) ... save current minimum positive value 4) print minimum positive value after readed all ints
11th Oct 2018, 10:22 AM
KrOW
KrOW - avatar