if ( something != -1 ) {
// do something
}
No?
Salem
Posting Sage
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
You have to deal with the array index and the loop index i separately.
Only increment the array index if -1 is not read.
If you see the -1, do not increment the array index.
WaltP
Posting Sage w/ dash of thyme
10,505 posts since May 2006
Reputation Points: 3,348
Solved Threads: 944
> printf("%5.1f ", Scores[i][j], Scores[i][j]);
What's wrong with this line?
Why not
printf("%5.1f %5.1f\n", Scores[i][0], Scores[i][1]);
and forego the inner loop.
Can you add a test now to stop it printing?
Salem
Posting Sage
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953