Let's say an integer is used to specify the number of decimal places an output is displayed, how would I implement this integer into the floating point output format?
Let's say an integer is used to specify the number of decimal places an output is displayed, how would I implement this integer into the floating point output format?
One of my friends mentioned something like separating the printf components %. and f while inserting the variable in between. I have no idea how it is done.
Still the same question - why haven't you read the printf manual page to find out.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
Ah, I got it! Thanks.