0

Smallest Value in an Array

Hello! For example, I have this program: https://code.sololearn.com/cJ2GR0x7o4Q0/?ref=app However, I want is to display the smallest value that is not zero. So in this case, I want it to display the value 2. Any tips on how to do this? Thanks for the help.

6th Nov 2018, 8:08 PM
Miqaela Weller
Miqaela Weller - avatar
3 Réponses
+ 3
You can check also if array[i] is not 0
6th Nov 2018, 8:25 PM
KrOW
KrOW - avatar
+ 1
well that was simple enough! thank you.
6th Nov 2018, 8:28 PM
Miqaela Weller
Miqaela Weller - avatar
+ 1
👍👍👍
6th Nov 2018, 8:28 PM
KrOW
KrOW - avatar