Can this code be shortened using variables?

hmmmm, I'm picking up what you are throwing down, but...
I'm not really familiar with that coding requirement (for the NTC Thermistor). Not sure which variable to use. I have this part... just renamed the uint8_t (i,j,k)
I'm not sure what all of this code is doing, so, that's why I'm asking.

`uint8_t i;
float average;

// take N samples in a row, with a slight delay
for (i=0; i< NUMSAMPLES; i++) {
samples[i] = analogRead(oATemp);
delay(10);
}

// average all the samples out
average = 0;
for (i=0; i< NUMSAMPLES; i++) {
average += samples[i];
}
average /= NUMSAMPLES;

// convert the value to resistance
average = 1023 / average - 1;
average = SERIESRESISTOR / average;
``