Help - US-100 Ultrasonic sensor

Does anyone know how to convert the cm into inch in accurate measurement without rounding the no.

base on this code the output only shoes whole number and no decimal value.

const int trig = 6;
const int echo = 7;
long time, dist;
void setup(){
Serial.begin(9600);
pinMode(trig, OUTPUT);
pinMode(echo, INPUT);
}
void loop(){
digitalWrite(trig, LOW);
delayMicroseconds(2);
digitalWrite(trig, HIGH);
delayMicroseconds(10);
digitalWrite(trig, LOW);

time = pulseIn(echo, HIGH);
dist = (time/2) / 29.1;

if(dist>500 or dist==0) Serial.println("Out of Range");
else{
Serial.print(dist);
Serial.println(" cm");
}

delay(500);
}

 float dist = ((float)time/2.0) / 29.1;

And remove
long time, dist;

Alternately, change the scale so that you measure in mm. Keep you previous calculation and divide by 2.91.