I have some code that produces a number.
I am able to display this number with many decimal places or as an integer but I would like to display it with 3 digits (and another number with 2 digits).
I then convert these numbers to strings to output them onto an LCD.
Could someone please advise me if there is an easy way of setting the number of decimal places.
Thanks