World Cup group stage: Difference between revisions
Content added Content deleted
Line 215: | Line 215: | ||
=={{header|Elena}}== |
=={{header|Elena}}== |
||
{{trans|Java}} |
{{trans|Java}} |
||
ELENA |
ELENA 5.0 : |
||
<lang elena>import system'routines; |
<lang elena>import system'routines; |
||
import extensions; |
import extensions; |
||
Line 221: | Line 221: | ||
public singleton program |
public singleton program |
||
{ |
{ |
||
static games := new string[] |
static games := new string[]{"12", "13", "14", "23", "24", "34"}; |
||
static results := "000000"; |
static results := "000000"; |
||
Line 238: | Line 238: | ||
closure() |
closure() |
||
{ |
{ |
||
var points := |
var points := IntMatrix.allocate(4, 10); |
||
int counter := 0; |
int counter := 0; |
||
do |
do |
||
{ |
{ |
||
var records := new int[] |
var records := new int[]{0,0,0,0}; |
||
for(int i := 0, i < 6, i += 1) |
for(int i := 0, i < 6, i += 1) |
||
Line 264: | Line 264: | ||
} |
} |
||
} |
} |
||
while |
while(program.nextResult()); |
||
new Range(0, 4).zipForEach(new string[] |
new Range(0, 4).zipForEach(new string[]{"1st", "2nd", "3rd", "4th"}, (i,l) |
||
{ |
{ |
||
console.printLine(l,": ", points[3 - i].toArray()) |
console.printLine(l,": ", points[3 - i].toArray()) |