取消
显示结果 
搜索替代 
您的意思是: 

Grade Book Project

I have been trying to build a grade book which takes an array with a students name, exam1 exam2 final exam outputs an average  in both numeric and letter form. I also want it to sort the students from highest average. I have gotten the program to do all of this except one final thing. Once it sorts the students from highest to lowest grade based on average i also need it to display number rank such as 1, 2, 3, 4 next to the student. Example Name Score  Grade  Rank   

               Sam      90       A        1

               Tim       88       B         2       etc.

 

Any help would be great i have tried so many things but am having trouble.

0 项奖励
1 条消息(共 7 条)
3,385 次查看

@paramedic wrote:

 

Any help would be great i have tried so many things but am having trouble.


Care to tell us what the problem is? Besides the slobby wiring...

 

 

0 项奖励
2 条消息(共 7 条)
3,347 次查看

You just need to add a # field to your cluster and in the 2nd loop, set it to N-i.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 项奖励
3 条消息(共 7 条)
3,344 次查看

@Yamaeda wrote:

You just need to add a # field to your cluster and in the 2nd loop, set it to N-i.

/Y


Ah, that was the problem... Monday morning...

 

Alternatively, in the 3rd loop set it to i+1. Might be a bit more intuitive.

 

In >LV17 there is a vim to sort 2D arrays on a specific column. Doesn't solve this problem, but makes more sense to use what's available. It opens doors to sorting on a given column,

4 条消息(共 7 条)
3,338 次查看

wiebe@CARYA wrote:

@Yamaeda wrote:

You just need to add a # field to your cluster and in the 2nd loop, set it to N-i.

/Y


Ah, that was the problem... Monday morning...

 

Alternatively, in the 3rd loop set it to i+1. Might be a bit more intuitive.

 

In >LV17 there is a vim to sort 2D arrays on a specific column. Doesn't solve this problem, but makes more sense to use what's available. It opens doors to sorting on a given column,


My bad, the 3rd loop! It should still be N-i, since it's reversed afterwards. 😉

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 项奖励
5 条消息(共 7 条)
3,335 次查看

@Yamaeda wrote:

wiebe@CARYA wrote:

@Yamaeda wrote:

You just need to add a # field to your cluster and in the 2nd loop, set it to N-i.

/Y


Ah, that was the problem... Monday morning...

 

Alternatively, in the 3rd loop set it to i+1. Might be a bit more intuitive.

 

In >LV17 there is a vim to sort 2D arrays on a specific column. Doesn't solve this problem, but makes more sense to use what's available. It opens doors to sorting on a given column,


My bad, the 3rd loop! It should still be N-i, since it's reversed afterwards. 😉

/Y


Right again, of course (still Monday).

 

I'd do the sort, then reverse, then build the new array. Makes more sense to me... Then you can use i+1.

 

Anyway, looks like the original question has been answered? OP still listening?

0 项奖励
6 条消息(共 7 条)
3,325 次查看

Yes thank you all for your help. 

0 项奖励
7 条消息(共 7 条)
3,293 次查看