Hello Ivan,
There is nothing wrong with your code. This link might help you understand why it is printing %f and how to fix it.
Note: There is no mbed_app.json
file created in a new project by default. You have to create it in the root directory of your project by yourself.
Best regards,
Zoltan