So my code takes in a string of letters, then outputs that string in a marquee fashion with the size of the sign being 5. So for example, If I want to output \"Hello World!\", t
Change the loop into this:
if (n <= marq_length) { printf("[%-*s]\n", marq_length, s); } else { for (i = 0; i < n + 1; i++) { putchar('['); for (j = 0; j < marq_length; j++) { char c = s[(i + j) % (n + 1)]; if (!c) c = ' '; putchar(c); } printf("]\n"); } }