Can anyone help me... I dont know how to rank the grades of 5 students... pls help me....
Can anyone help me... I dont know how to rank the grades of 5 students... pls help me....
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
If you're not allowed to use standard library algorithms, just work out how you would do it on paper or in your head.
If you have no idea we cannot help you.
Try to get one, write it and we will tell you how to improve it.