How can i rank grades?

This is a discussion on How can i rank grades? within the C++ Programming forums, part of the General Programming Boards category; Can anyone help me... I dont know how to rank the grades of 5 students... pls help me.......

  1. #1
    Registered User
    Join Date
    Mar 2008
    Posts
    2

    Smile How can i rank grades?

    Can anyone help me... I dont know how to rank the grades of 5 students... pls help me....

  2. #2
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    What do you mean by "rank"?
    Do you want to find the 5 highest grades? If so, you probably want to use nth_element() or partial_sort(). See the examples in: Chapter 86. Use the right STL sort algorithm

  3. #3
    Registered User
    Join Date
    Jan 2005
    Posts
    7,340
    If you're not allowed to use standard library algorithms, just work out how you would do it on paper or in your head.

  4. #4
    coder
    Join Date
    Feb 2008
    Posts
    127
    If you have no idea we cannot help you.
    Try to get one, write it and we will tell you how to improve it.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 16
    Last Post: 10-27-2007, 12:42 PM
  2. Array Help
    By silverback011 in forum C Programming
    Replies: 7
    Last Post: 08-19-2006, 09:58 PM
  3. having problems with my card program
    By mac025 in forum C Programming
    Replies: 4
    Last Post: 01-31-2006, 03:26 PM
  4. Grades program has me lost
    By adrea in forum C++ Programming
    Replies: 3
    Last Post: 12-14-2002, 07:35 PM
  5. Replies: 13
    Last Post: 08-15-2002, 09:20 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21