Ok. That's done with. Here's 2 others I need help with that I'm posting in the midst of trying to figure it out in the meantime. #1 an array called "alpha" with 50 components - type is double...
10 elements per line need to be outputted. But, How do I do that?
I thought maybe a nested for loop like this one
for (index = 0; index < 50; index++)
for (item = 0; item < 10; item++)
cout << alpha[index] << " " << endl;
But, is that how?
Probably nothing like that, right?
I doubt myself.
There ya go. But the first loop should not be increased by 1, but 10, otherwise you'll have 40 more sets of 10 printing out then expected
Not quite. What you want is more like:
for (i = 0; i < 5; i++)
{
for (j = 0; j < 10; j++)
{
cout << alpha[10*i + j] << " ";
}
cout << endl;
}