I don’t know how to correctly formulate the heading ... but I wonder if there is any smart format specifier that will take number 4.5 and give me "4.5", but also take number 2 and give me @ "2".
Using the% .1f specifier gives me @ "4.5", but also @ "2.0". I am trying to get rid of the ".0" bit.
Is there such a beast, or will I have to work a bit on this? FWIW, I'm trying to iterate over an array of values from 0 to 5, increasing in half-steps, so 0, 0.5, 1, 1.5, ..., 4.5, 5
Hooray!
source
share