Originally Posted by
ehoi
Well, I've not run that code, but it seems to run off the end of the screen as it is. the computer would automaticly place words on the next line down once this happened or it might just type over the last ones. you need to insert an <<endl at the end of so many cout statements to properly get it to go down a line. To do this you'll need to have an if statment in the for loop that says someing like this:
if (i% NumberOfEntriesWantedOn_A_Line==0 && i!=0)
{
cout<<endl;
}
that way it will only activate the number of entries wanted. The % sign means that if you devide
10 by 8 (written like this in code: 10\8 ) the computer can give you two answers the nomal one is 1 because 10 is divided into 8 one time. the second answer the computer could give you is the remainder of the numbers once divided. so 10-8 is two, therefore, the "modulus" of 10/8 is 2. the % returns the two and is an agruement. Note that the if statement I wrote has an agruement asking if the remainder is zero. and if i itself is not a zero (because 0/anyghing is 0.)
As to the "Best" way to get your task done, well, there are lots of ways to do most everything in programing. Thats part of why I like it. You get to design it how you want. Hope that helps.