Need a help.... please? | SoloLearn: Learn to code for FREE!


Need a help.... please?

My question is to find high and low value. high value is printing properly but low value not it giving 0 0 anyone can fix please

5/17/2020 9:39:54 AM


5 Answers

New Answer


Your code gives a lot of error and warning messages.


Aniket Soni the problem starts after you printed the first and second top marks . You are making the if statement useless by comparing l1 and l2 having known both values are already zero . As a result , No if statement gets a true value in your loop and result remains 0 as values of l1 and l2 are not altered .


Its working in other compiler


Unfortunately I can only use the code playground. But I would create two loops: one for min value and one for max value. Then you don't have any troubles.