Smoothing a float value

If I want to "smooth" an analog value, but still keep 1 decimal point. Would all I have to do is replace the first int in the smoothing code with a float? I am using an lm34 and I know the math is the same for other common temp sensors. Do most people just keep temperature as an integer for general purpose use?

Smoothing code posted for quick reference:

const int numReadings = 10;

int readings[numReadings];      // the readings from the analog input
int index = 0;                  // the index of the current reading
int total = 0;                  // the running total
int average = 0;                // the average

int inputPin = A0;

void setup()
{
  // initialize serial communication with computer:
  Serial.begin(9600);                  
  // initialize all the readings to 0:
  for (int thisReading = 0; thisReading < numReadings; thisReading++)
    readings[thisReading] = 0;          
}

void loop() {
  // subtract the last reading:
  total= total - readings[index];        
  // read from the sensor:  
  readings[index] = analogRead(inputPin);
  // add the reading to the total:
  total= total + readings[index];      
  // advance to the next position in the array:  
  index = index + 1;                    

  // if we're at the end of the array...
  if (index >= numReadings)              
    // ...wrap around to the beginning:
    index = 0;                          

  // calculate the average:
  average = total / numReadings;        
  // send it to the computer as ASCII digits
  Serial.println(average);  
  delay(1);        // delay in between reads for stability            
}

If I want to "smooth" an analog value, but still keep 1 decimal point.

What does this mean? An analog value is an integer. That's what analogRead() returns.

If you want the average as a float, instead of an int, that is a different issue.

SteveTron:
I want to "smooth" an analog value, but still keep 1 decimal point.

You seem to be confusing two different concepts: smoothing by taking an average of multiple values, and controlling the number of decimal places shown when you display the value. You already have code to take the average. If you want to control how many decimal places are shown when you print the result, use the appropriate overload of the print() method which lets you specify that.

There's also the long winded mathematical way.
Say you have 123.456
Multiply by 10 =1234.56
Cast it as an int. =1234
Cast it as a float and divide by 10 =123.4
There's probably a simpler way.

The simple way to reduce the number of decimal places is

Serial.println(average, 1);

Which would print the value and include 1 decimal place. For 2 decimal places it would obviously be ....

Serial.println(average, 2);

thermalhound:
The simple way to reduce the number of decimal places is

Serial.println(average, 1);

Which would print the value and include 1 decimal place. For 2 decimal places it would obviously be ....

Serial.println(average, 2);

2 places is the default, so Serial.println(average); would work just as well