yes - it's something like homework - i need to realize the fprintf() - the base function for this - as i understand is putchar() -
putchar() is enough for string type =
%s
and, as i think for int to
%i
Well, as a general rule (which I am sure you have been told already), we do not do any homework for you...
Beside that, doing it generally for floats isn't that much different that doing it for integers. You just have to to separate the whole number part from the fraction and run a loop for each of the digits to be output, with possible padding in front of the whole number part and filling with zeros possibly on the fraction part, up to a defined precision...
Ralf