09-21-2022 01:40 AM - edited 09-21-2022 02:24 AM
As has been said, your code has significant faults and we cannot really help in detail, because we are missing important information.
09-21-2022 02:32 AM
Since you seem to prefer pictures instead of VIs (else you would have attached your VI and some typical data! 🙂 ), here's a "picture" of one possibility:
(If you want the output in a different sort order a few small modifications should do it)
09-21-2022 08:35 AM - edited 09-21-2022 08:40 AM
@altenbach wrote:
Since you seem to prefer pictures instead of VIs (else you would have attached your VI and some typical data! 🙂 ), here's a "picture" of one possibility:
(If you want the output in a different sort order a few small modifications should do it)
Missing tie ranks. Needs a threshold to rank ties to lower rank and skip next. i.e. grades 95, 95, 80, 80, 70 should rank 1, 1, 3, 3, 5. Use 100 - Grades[] sorted as with ANY LEAST ERROR calculation
09-21-2022 09:14 AM - edited 09-21-2022 09:18 AM
Well, tie ranks are not mentioned in the poor problem description, but could be implemented with tiny code changes. I won't go far past a code skeleton until all requirements are outlined. 🙂
Should the rank be based on weighted average or letter grade? How many matching decimal digits are needed to consider two floating point values "equal enough" for a tie? What a can of worms!
09-21-2022 02:46 PM
Rank is a least error problem or, it is not rank.