2. Try to start your for loops at zero.
This I understand for the most part. But in my code, the only way I saw to test it using the counter instead of a second variable was to see if it was divisible by the number of names per line. So, it would start with 1(first name) and then divided by number of names per line (lets say 8 names per line). 1 / 8 has a remainder of 1 which does not equal zero, so it would continue. It would go until the 8th name, 8 / 8 remainder is 0, which would give the new line. If I started my counter with zero, 0 / 8 remainder is 0, which would print one name and then put in a new line and continue as expected. Again, I had a hard time figuring out how to do this in the first place, now I am struggling to figure out how to start to my loop at zero and still count the number of names on the line (without putting i+1 into the boolean).
Originally posted by Katrina Owen:
Technically, if you try using a name with the perfect length, you should see some wrapping going on - i.e. the last name (which *should have* fit, doesn't).
Originally posted by Tony VanHorn:
ahh, so is this why some people have switched over to using a unix system (well this and some other reasons I am sure).
My, my, aren't you a big fella. Here, have a tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koophttps://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton