i have an array (d_available[i])with some zero elements and non zero elements i want to find the minimum of the non zero elements (min_available)

this is what i thought will work but still gives me 0 as minimium

Code:min_available=d_available[0] ; for(i=0;i<NROWS;i++){ if (min_available>d_available[i] && d_available> 0) min_available=d_available[i]; }