FizzBuzz: Difference between revisions

Content added Content deleted
(Added a solution and explanation for Rhovas)
(Add Ecstasy example)
Line 3,294: Line 3,294:


OUTPUT(d);</syntaxhighlight>
OUTPUT(d);</syntaxhighlight>

=={{header|Ecstasy}}==
<syntaxhighlight lang="java">module FizzBuzz
{
void run()
{
@Inject Console console;
for (Int x : 1..100)
{
console.println(switch (x % 3, x % 5)
{
case (0, 0): "FizzBuzz";
case (0, _): "Fizz";
case (_, 0): "Buzz";
case (_, _): x.toString();
});
}
}
}</syntaxhighlight>


=={{header|Eero}}==
=={{header|Eero}}==