Smoothing out analog read value

void getTemperature(int* temp) {
  uint8_t i;
  float average;
  for (i=0; i< NUMSAMPLES; i++) {
     samples[i] = analogRead(THERMISTORPIN);
     delayMicroseconds(200);
  }
  average = 0;
  for (i=0; i< NUMSAMPLES; i++) {
    average += samples[i];
  }

Why the array?
Unless you want to do a rolling average (hint) just sum them as you read them.
(BTW analogRead itself takes about 100us, so the delay is pretty redundant)