I’m working on the project Euler problems, and #8 requires that you find the largest product of 5 consecutive numbers in a 1000-digit number. Does anyone know how I can format the number to be one long string over multiple lines instead of having it be one long string on one line?
Thanks!
The compiler will automatically concatenate string literals that are separated by white space. You can simply do:
The resulting character array will be the same as if you typed one very long string literal. A link for the lazy.