1 | static float averageScore(L<Scored> scores) { |
2 | if (empty(scores)) ret 0; |
3 | double sum = 0; |
4 | for (Scored s : scores) |
5 | sum += getScore(s); |
6 | ret (float) (sum/l(scores)); |
7 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1015274 |
Snippet name: | averageScore |
Eternal ID of this version: | #1015274/3 |
Text MD5: | 51893febf9dedf99181bd582fa097c2a |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-05-11 12:47:14 |
Source code size: | 180 bytes / 7 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 407 / 456 |
Version history: | 2 change(s) |
Referenced in: | [show references] |