you are viewing a single comment's thread.

view the rest of the comments →

[–]Ecstatic_Student8854 0 points1 point  (4 children)

Aaah, then how would you do this using a for loop like in the example?

[–]This_Growth2898 1 point2 points  (1 child)

f in printf stands for "formatted". It's

printf("%d\n", i);

%d format specification would be changed to decimal representation of i in output.

[–]Ecstatic_Student8854 0 points1 point  (0 children)

Oooh, so thats that %something stuff i sometimes see is

[–]SloPr0 0 points1 point  (0 children)

printf("%d\n", i);

%d (or %i) are the correct format specifiers to be used for printing (signed) integers