Anonymous user
World Cup group stage: Difference between revisions
m
→{{header|Elena}}
Line 215:
=={{header|Elena}}==
{{trans|Java}}
ELENA
<lang elena>import system'routines;
import extensions;
Line 227:
nextResult()
{
var s := results;
if (results=="222222") { ^ false };
Line 237 ⟶ 239:
{
var points := new IntMatrix(4, 10);
int counter := 0;
{
var records := new int[]
for(int i := 0, i < 6, i += 1)
Line 246 ⟶ 249:
var r := results[i];
r =>
"2" { records[games[i][0].toInt() - 49]
"1" {
records[games[i][0].toInt() - 49]
records[games[i][1].toInt() - 49]
}
"0" { records[games[i][1].toInt() - 49]
};
records := records.ascendant();
for(int i := 0, i <= 3, i += 1)
{
points[i][records[i]] := points[i][records[i]] + 1
}
};
|