TFMini Plus - Trouble converting uint16_t to double to output data in meters

Hi, I have a TFMini Plus(long-range distance sensor) that currently outputs data in centimeters, however I would like to convert this value into meters.

Using the example given by Bud Ryerson, the function getDist() retrieves data from the sensor and assigns them to the declared variables. Variable tfDist, which is outputted, is a uint16_t integer type. Here is a segment of the current code and output:

    if ( tfmP.getData( tfDist, tfFlux, tfTemp)) // Get data from the device.
    {
      printf( "Dist: %u", tfDist);          // Display the distance.
      
      break;                                   // Escape this sub-loop
    }

    else                        // If the command fails...
    {
      tfmP.printStatus(true);  // display the error.
    }
  }
Loop:01 Dist: 176
Loop:02 Dist: 177
Loop:03 Dist: 177
Loop:04 Dist: 176
Loop:05 Dist: 177

I have read online that to convert a uint16_t to a double or float, I just need to apply math using a double and it will be converted into a double, as I have done here.

if ( tfmP.getData( tfDist, tfFlux, tfTemp)) // Get data from the device.
    {
      double tfData;
      tfData = tfDist / 100.0;
      printf( "Dist: %f", tfData);         // Display the distance.
      
      break;                                   // Escape this sub-loop
    }
    else                        // If the command fails...
    {
      tfmP.printStatus( true);  // display the error.
    }

However, for some reason, the output is always just question marks:

Loop:01 Dist: ?
Loop:02 Dist: ?
Loop:03 Dist: ?
Loop:04 Dist: ?
Loop:05 Dist: ?

I am very confused and not sure whether this is an issue using a uint16_t or if something is wrong with the printf library or if there's something else I'm missing here.

Can someone please help me out? Thank you!

Arduinos do not, by default support floating point in printf() statements. You should use dtoa().

If you are using the IDE and this is going to Serial, you can just use

Serial.print( "Dist: " );
Serial.print(tfData,2);         // Display the distance. 2 decimal places
//...