Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

Array not printing

array printing

  • Please log in to reply
24 replies to this topic

#25 JanitorMoe

JanitorMoe

    CC Resident

  • Member
  • PipPipPipPip
  • 55 posts

Posted 17 November 2010 - 07:32 AM

Ok sorry again another questoin pertaining this program. I am putting it through a bubble sort so I can find the median of each exam. I used this code I thought it would work, but to no avail.

for(i = 0; i <= NUMBERofSTUDENTS; i++){
    for(j = 0; j <= EXAMSCORES - 4; j++){
      if( scores[ i ][ j ] > scores[ i ][ j +1 ]) {
        holder =  scores[ i ][ j + 1 ];
        scores[ i ][ j + 1] = scores[ i ][ j ];
        scores[ i ][ j ] = holder;
      }
    printf("\n");
    }
    printf("%d",scores[ i ][ j ]);
}

  • 0





Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download