I'm coding something in C and I have a number of variable size up to 3 digits, that I would like to convert to a float. For example, I have 250, I'd like it to show up as 2.50 or if I have 5 I'd like it to show as .05.
What possible ways can I do that? I had thought of sprintf() to make it a string and format it, but I can't figure out how to pull the the numbers to format it with a . in the right spot. atof() ended up with things like 250.00. Thanks in advance!