Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Code Question  RSS feed

 
Nath Maniedeo
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, as recommeded by teachers...I can't get his code to work:

for loop starting at zero
{
if the current number of names is the same as namesPerLine
create a new line
print name
}
in playing with the code, it either prints only one line of names that will fit on a line OR prints it straight downwards...
 
Nath Maniedeo
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
wait, I think I almost have it.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!