World Cup group stage: Difference between revisions

m
No edit summary
Line 215:
=={{header|Elena}}==
{{trans|Java}}
ELENA 4.x1 :
<lang elena>import system'routines;
import extensions;
Line 221:
public singleton program
{
static games := new string[]{::("12", "13", "14", "23", "24", "34"});
static results := "000000";
Line 228:
{
var s := results;
if (results=="222222") { ^ false };
Line 239:
{
var points := new IntMatrix(4, 10);
int counter := 0;
doWhile(program.nextResult()) do
{
var records := new int[]{::(0,0,0,0});
for(int i := 0, i < 6, i += 1)
Line 263:
points[i][records[i]] := points[i][records[i]] + 1
}
};
while:(program.nextResult());
new Range(0, 4).zipForEach(new string[]{::("1st", "2nd", "3rd", "4th"}), (i,l)
{
console.printLine(l,": ", points[3 - i].toArray())
Anonymous user