How do I align a number like this in C?
Why is printf(“%8d\n”, intval); not working for you? It should… You did not show the format strings for any of your “not working” examples, so I’m not sure what else to tell you. #include <stdio.h> int main(void) { int i; for (i = 1; i <= 10000; i*=10) { printf(“[%8d]\n”, i); } return (0); } … Read more