Anonymous user
World Cup group stage: Difference between revisions
m
→{{header|Elena}}
Line 216:
{{trans|Java}}
ELENA 3.4 :
<lang elena>import system'routines
import extensions
public
{
static games :=
static results := "000000"
nextResult()
if (results=="222222")
results := (results
^ true
closure()
var points :=
doUntil(program.nextResult().Inverted)
▲ [
}▼
▲ [
▲ (results[i]) =>
▲ "2" [ records[games[i][0] toInt - 49] += 3 ];
▲ "1" [
▲ records[games[i][0] toInt - 49] += 1.
▲ records[games[i][1] toInt - 49] += 1
▲ ];
▲ "0" [ records[games[i][1] toInt - 49] += 3 ].
▲ ].
new Range(0,
});
}
▲ 0 repeatTill:4; zip:("1st", "2nd", "3rd", "4th") forEach(:i:l)
▲ [
▲ console printLine(l,": ", points[3 - i] toArray)
▲ ].
▲ ]
▲}.</lang>
{{out}}
<pre>
|