I might add also that the same thing is possible using IF's, select case is always more effcient though however.

Code:
      for (int i = 0; i < 12; i++)
      {
          sample = tempArray[i];
          
          if (sample < 0)
             rangeA++;
          else if (sample < 10)
             rangeB++;
          else if (sample < 20)
             rangeC++;
          else if (sample < 30)
             rangeD++;
          else
             rangeE++;
      }
Notice how we start with the smallest number first? Always start with the smallest value first and work downwards with the next biggest value.

Hope it helps

Trent Jackson