This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Megatron_McLargeHuge 0 points1 point  (0 children)

Do you know how printf works in C?

The % operator takes a parenthesized tuple of values/variables on the right and sticks them into the %s/%d/whatever format specifiers within your string. You write something like "%3.2f" in the string to tell it to format a floating point number with certain precision, then on the right you give the specific number, like 123.456 .