+ 4
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 https://code.sololearn.com/caKQPDt8YC9m/?ref=app
5 Réponses
+ 1
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 .
0
Your code gives a lot of error and warning messages.
0
Its working in other compiler
0
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.