Good Morning, everybody. I have a program where the output is giving me trouble. I have one variable and I am wondering if I can print different parts of it on different rows. For example, I have column headers and under each header, I want to print about five values per row and I want about five rows. I am wondering if there is a way to do this? Currently all of my values are printed in one big line and I want to spit this into separate rows. Is there a way to do this? Thanks
You can't just expect printf() to split lines for you. To cater your output you need to do some math and explitly do println() or printf(%n) or something. Same goes for tabs or spaces in between values.
A similar easier case is how would you ensure the output to be at most 80 characters long without wrapping any words on the console?