static float averageScore(L<Scored> scores) { if (empty(scores)) ret 0; double sum = 0; for (Scored s : scores) sum += getScore(s); ret (float) (sum/l(scores)); }
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: | 406 / 455 |
Version history: | 2 change(s) |
Referenced in: | [show references] |